aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2019-10-16 19:12:33 +0000
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2019-10-16 19:12:33 +0000
commit6b50c7097e7dddc27745e16c8ba0f564a0f826ae (patch)
tree61579dc656afbffb591dd5816a606838898fd1e1
parent4b61247b9a504e1bae132fb9f05e66a8a7d45141 (diff)
[Darwin, specs] Backport fixes for driver handling of PIE options.
pie, no-pie and rdynamic are driver options, we can process them in the relevant place and drop them once dealt with. There's no need to generate a new header to process the no_compact_unwind which is applied on the basis of the target system. Support for the -pie, -no_pie and -no_compact_unwind options should ideally be checked at configure time, however the status quo is to assert that linkers capable of targeting the relevant systems support these options (i.e. we trust that the user doesn't attempt to configure inappropriately). TODO: check the availability of the linker opts in configure rather than trusting to the user. This will fix the fail of pie-7.c, which is a result of failing to handle the no-pie driver option. 2019-10-16 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline 2019-07-03 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases. (RDYNAMIC): Rename to, DARWIN_RDYNAMIC. (DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker clauses. (LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and DARWIN_NOPIE_SPEC. Backport from mainline 2019-06-19 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC and DARWIN_NOPIE_SPEC. (RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC. (DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h. (DARWIN_NOPIE_SPEC): Collate from darwin10.h. (DARWIN_NOCOMPACT_UNWIND): New from darwin10.h (DARWIN_EXPORT_DYNAMIC): Delete. * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind and pie options processing to darwin.h. * config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@277078 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog221
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog20
-rw-r--r--gcc/ada/gcc-interface/decl.c16
-rw-r--r--gcc/ada/sem_ch8.adb6
-rw-r--r--gcc/ada/sem_elab.adb16
-rw-r--r--gcc/ada/sem_spark.adb4
-rw-r--r--gcc/ada/sem_util.adb43
-rw-r--r--gcc/ada/sem_util.ads21
-rw-r--r--gcc/common/config/s390/s390-common.c4
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config/aarch64/aarch64.md4
-rw-r--r--gcc/config/aarch64/aarch64.opt6
-rw-r--r--gcc/config/alpha/alpha.c3
-rw-r--r--gcc/config/arm/arm.opt6
-rw-r--r--gcc/config/darwin.h45
-rw-r--r--gcc/config/darwin10.h9
-rw-r--r--gcc/config/darwin9.h6
-rw-r--r--gcc/config/mips/mips.c4
-rw-r--r--gcc/config/pa/pa.c163
-rw-r--r--gcc/config/pa/pa.h2
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def80
-rw-r--r--gcc/config/rs6000/rs6000-p8swap.c5
-rw-r--r--gcc/config/s390/8561.md92
-rw-r--r--gcc/config/s390/driver-native.c4
-rw-r--r--gcc/config/s390/s390-builtins.def2
-rw-r--r--gcc/config/s390/s390-c.c15
-rw-r--r--gcc/config/s390/s390-opts.h2
-rw-r--r--gcc/config/s390/s390.c48
-rw-r--r--gcc/config/s390/s390.h18
-rw-r--r--gcc/config/s390/s390.md58
-rw-r--r--gcc/config/s390/s390.opt5
-rw-r--r--gcc/config/s390/vector.md2
-rw-r--r--gcc/config/s390/vx-builtins.md6
-rw-r--r--gcc/config/sh/sh.c19
-rw-r--r--gcc/config/sh/sh.h2
-rw-r--r--gcc/config/sh/sh.md90
-rw-r--r--gcc/cp/ChangeLog27
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/pt.c7
-rw-r--r--gcc/dwarf2out.c10
-rw-r--r--gcc/fortran/ChangeLog70
-rw-r--r--gcc/fortran/check.c40
-rw-r--r--gcc/fortran/decl.c48
-rw-r--r--gcc/fortran/io.c61
-rw-r--r--gcc/fortran/match.c18
-rw-r--r--gcc/fortran/primary.c2
-rw-r--r--gcc/fortran/simplify.c10
-rw-r--r--gcc/fortran/trans-array.c11
-rw-r--r--gcc/fortran/trans-decl.c6
-rw-r--r--gcc/ipa-cp.c1
-rw-r--r--gcc/ipa-prop.c12
-rw-r--r--gcc/ipa-prop.h1
-rw-r--r--gcc/po/ChangeLog8
-rw-r--r--gcc/po/es.po84
-rw-r--r--gcc/po/fi.po64
-rw-r--r--gcc/testsuite/ChangeLog118
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nontype5.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/var-templ63.C5
-rw-r--r--gcc/testsuite/g++.dg/pr92022.C13
-rw-r--r--gcc/testsuite/g++.dg/torture/pr91606.C109
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr91812.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/nosplit-di-const-volatile_1.c15
-rw-r--r--gcc/testsuite/gcc.target/mips/pr91769.c19
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr91275.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c47
-rw-r--r--gcc/testsuite/gfortran.dg/dec_type_print_3.f904
-rw-r--r--gcc/testsuite/gfortran.dg/function_kinds_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr47054_1.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/pr47054_2.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/pr85543.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr91587.f906
-rw-r--r--gcc/testsuite/gfortran.dg/pr91641.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr91649.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr91714.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/pr91715.f905
-rw-r--r--gcc/testsuite/gfortran.dg/pr91785.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr91801.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr91802.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr91864.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/pr91942.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_22.f032
-rw-r--r--gcc/tree-ssa-phiprop.c11
-rw-r--r--gcc/tree-vect-stmts.c4
-rw-r--r--gcc/tree.c5
-rw-r--r--libgcc/ChangeLog17
-rw-r--r--libgcc/config/pa/fptr.c16
-rw-r--r--libgcc/config/pa/lib2funcs.S12
-rw-r--r--libgcc/config/pa/milli64.S23
89 files changed, 1643 insertions, 539 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b4cd6e269b9..fe8b0d5c3d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,224 @@
+2019-10-16 Iain Sandoe <iain@sandoe.co.uk>
+
+ Backport from mainline
+ 2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases.
+ (RDYNAMIC): Rename to, DARWIN_RDYNAMIC.
+ (DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker
+ clauses.
+ (LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and
+ DARWIN_NOPIE_SPEC.
+
+ Backport from mainline
+ 2019-06-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC
+ and DARWIN_NOPIE_SPEC.
+ (RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC.
+ (DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h.
+ (DARWIN_NOPIE_SPEC): Collate from darwin10.h.
+ (DARWIN_NOCOMPACT_UNWIND): New from darwin10.h
+ (DARWIN_EXPORT_DYNAMIC): Delete.
+ * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind
+ and pie options processing to darwin.h.
+ * config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h
+
+2019-10-16 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-10-04 Richard Biener <rguenther@suse.de>
+
+ PR lto/91968
+ * tree.c (find_decls_types_r): Do not remove LABEL_DECLs from
+ BLOCK_VARS.
+
+ 2019-09-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91812
+ * tree-ssa-phiprop.c (propagate_with_phi): Do not replace
+ volatile loads.
+
+ 2019-09-17 Richard Biener <rguenther@suse.de>
+
+ PR debug/91772
+ * dwarf2out.c (dwarf2out_late_global_decl): If early dwarf
+ was missing generate locations only once.
+
+ 2019-09-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91790
+ * tree-vect-stmts.c (vectorizable_load): For BB vectorization
+ use the correct DR for setting up realignment.
+
+2019-10-14 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ Backport from trunk
+ 2019-09-26 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * config/rs6000/rs6000-builtin.def: (LVSL, LVSR, LVEBX, LVEHX,
+ LVEWX, LVXL, LVXL_V2DF, LVXL_V2DI, LVXL_V4SF, LVXL_V4SI, LVXL_V8HI,
+ LVXL_V16QI, LVX, LVX_V1TI, LVX_V2DF, LVX_V2DI, LVX_V4SF, LVX_V4SI,
+ LVX_V8HI, LVX_V16QI, LVLX, LVLXL, LVRX, LVRXL, LXSDX, LXVD2X_V1TI,
+ LXVD2X_V2DF, LXVD2X_V2DI, LXVDSX, LXVW4X_V4SF, LXVW4X_V4SI,
+ LXVW4X_V8HI, LXVW4X_V16QI, LD_ELEMREV_V1TI, LD_ELEMREV_V2DF,
+ LD_ELEMREV_V2DI, LD_ELEMREV_V4SF, LD_ELEMREV_V4SI, LD_ELEMREV_V8HI,
+ LD_ELEMREV_V16QI): Use the PURE attribute.
+
+2019-10-10 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/92022
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Skip DEBUG_INSN.
+
+2019-10-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2019-10-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/88630
+ * config/sh/sh.h (TARGET_FPU_SH4_300): New macro.
+ * config/sh/sh.c (sh_option_override): Enable fsca and fsrra insns
+ also for TARGET_FPU_SH4_300.
+ (sh_emit_mode_set): Check for TARGET_FPU_SH4_300 instead of
+ TARGET_SH4_300.
+ * config/sh/sh.md (toggle_pr): Add TARGET_FPU_SH4_300 condition.
+ (negsf2): Expand to either negsf2_fpscr or negsf2_no_fpscr.
+ (*negsf2_i): Split into ...
+ (negsf2_fpscr, negsf2_no_fpscr): ... these new patterns.
+ (abssf2): Expand to either abssf2_fpsc or abssf2_no_fpsc.
+ (**abssf2_i): Split into ...
+ (abssf2_fpscr, abssf2_no_fpscr): ... these new patterns.
+ (negdf2): Expand to either negdf2_fpscr or negdf2_no_fpscr.
+ (*negdf2_i): Split into ...
+ (negdf2_fpscr, negdf2_no_fpscr): ... these new patterns.
+ (absdf2): Expand to either absdf2_fpscr or absdf2_no_fpsc.
+ (**abssf2_i): Split into ...
+ (absdf2_fpscr, absdf2_no_fpscr): ... these new patterns.
+
+2019-10-10 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ Backport from mainline
+ 2019-10-10 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * common/config/s390/s390-common.c (PF_ARCH13): Rename to...
+ (PF_Z15): ... this.
+ * config.gcc: Add z15 as option for --with-arch and --with-tune
+ configure switches.
+ * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Add
+ error reporting for unsupported builtins.
+ * config/s390/s390-opts.h (enum processor_type): Rename
+ PROCESSOR_8561_ARCH13 to PROCESSOR_8561_Z15.
+ * config/s390/8561.md: Rename arch13 to z15 throughout the file.
+ * config/s390/driver-native.c (s390_host_detect_local_cpu):
+ Likewise.
+ * config/s390/s390-builtins.def: Likewise.
+ * config/s390/s390.c (processor_table): Add z15 as option and keep arch13 as alternative.
+ (s390_expand_builtin): Add missing check for unsupported builtins.
+ (s390_canonicalize_comparison): Rename TARGET_ARCH13 to TARGET_Z15.
+ (s390_rtx_costs): Likewise.
+ (s390_get_sched_attrmask): Rename arch13 to z15.
+ (s390_get_unit_mask): Likewise.
+ (s390_is_fpd): Likewise.
+ (s390_is_fxd): Likewise.
+ * config/s390/s390.h (enum processor_flags): Likewise.
+ * config/s390/s390.md: Likewise.
+ * config/s390/vector.md: Likewise.
+ * config/s390/vx-builtins.md: Likewise.
+ * config/s390/s390.opt: Add z15 to processor_type value.
+
+2019-10-07 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ Backport from mainline
+ 2019-10-01 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/91275
+ * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Don't swap
+ vpmsumd.
+
+2019-10-05 Andrea Corallo <andrea.corallo@arm.com>
+
+ Backport from mainline
+ 2019-10-03 Andrea Corallo <andrea.corallo@arm.com>
+ * gcc/ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum
+ when finished.
+ * ipa-prop.c (ipcp_free_transformation_sum): New function.
+ * ipa-prop.h (ipcp_free_transformation_sum): Add declaration.
+
+2019-10-04 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
+
+ Backport from mainline
+ 2019-10-03 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
+
+ PR target/91769
+ * config/mips/mips.c (mips_split_move): Use reg_overlap_mentioned_p
+ instead of REGNO equality check on addr.reg.
+
+2019-10-04 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
+
+ Backport from mainline
+ 2019-07-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/mips/mips.c (mips_split_move): Zero-initialize addr
+ and check whether addr.reg is nonnull before using it.
+
+2019-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backport from mainline
+
+ 2019-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR fortran/91716
+ * trans-array.c (gfc_conv_array_initializer): Always assign the
+ array type of the field to the string constant.
+
+2019-10-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+
+ 2019-10-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/88562
+ * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Use
+ sh_check_add_incdec_notes to preserve REG_INC notes when replacing
+ a memory access insn.
+
+
+2019-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2019-09-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64.md (mov<mode>): Don't call
+ aarch64_split_dimode_const_store on volatile MEM.
+
+2019-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2019-09-26 Matt Turner <mattst88@gmail.com>
+
+ PR driver/69471
+ * config/aarch64/aarch64.opt (march=): Add Negative(march=).
+ (mtune=): Add Negative(mtune=).
+ (mcpu=): Add Negative(mcpu=).
+ * config/arm/arm.opt: Likewise.
+
+2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/86805
+ * config/sh/sh.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
+
+2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/80672
+ * config/sh/sh.c (parse_validate_atomic_model_option): Use
+ std::string::compare instead of std::string::find.
+
2019-09-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Backport from mainline
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 1c14e6dbe55..e6b876ab237 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20190926
+20191016
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index c897fe2813a..64ff4397fd4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,23 @@
+2019-10-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/91995
+ * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
+ to Defining_Entity.
+ * sem_elab.adb (Find_Unit_Entity): Likewise. Deal with N_Subunit
+ here in lieu of in Defining_Entity.
+ * sem_spark.adb (Check_Callable_Body): Likewise.
+ (Check_Package_Body): Likewise.
+ * sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters.
+ * sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters,
+ and adjust accordingly. Deal with N_Compilation_Unit.
+
+2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
+ sign of the value when deciding to build a NEGATE_EXPR.
+ <PLUS_EXPR>: Remove redundant line.
+ <BIT_AND_EXPR>: Do the negation here.
+
2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 4e73df0d7f0..a724ba693fd 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -8255,9 +8255,8 @@ annotate_value (tree gnu_size)
{
case INTEGER_CST:
/* For negative values, build NEGATE_EXPR of the opposite. Such values
- can appear for discriminants in expressions for variants. Note that,
- sizetype being unsigned, we don't directly use tree_int_cst_sgn. */
- if (tree_int_cst_sign_bit (gnu_size))
+ can appear for discriminants in expressions for variants. */
+ if (tree_int_cst_sgn (gnu_size) < 0)
{
tree t = wide_int_to_tree (sizetype, -wi::to_wide (gnu_size));
tcode = Negate_Expr;
@@ -8335,9 +8334,8 @@ annotate_value (tree gnu_size)
&& tree_int_cst_sign_bit (TREE_OPERAND (gnu_size, 1)))
{
tcode = Minus_Expr;
- ops[0] = annotate_value (TREE_OPERAND (gnu_size, 0));
- wide_int op1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1));
- ops[1] = annotate_value (wide_int_to_tree (sizetype, op1));
+ wide_int wop1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1));
+ ops[1] = annotate_value (wide_int_to_tree (sizetype, wop1));
break;
}
@@ -8378,9 +8376,9 @@ annotate_value (tree gnu_size)
Such values can appear in expressions with aligning patterns. */
if (TREE_CODE (TREE_OPERAND (gnu_size, 1)) == INTEGER_CST)
{
- wide_int op1 = wi::sext (wi::to_wide (TREE_OPERAND (gnu_size, 1)),
- TYPE_PRECISION (sizetype));
- ops[1] = annotate_value (wide_int_to_tree (sizetype, op1));
+ wide_int wop1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1));
+ tree op1 = wide_int_to_tree (sizetype, wop1);
+ ops[1] = annotate_value (build1 (NEGATE_EXPR, sizetype, op1));
}
break;
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index a5e821da1b4..340aa49bd11 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -4256,16 +4256,14 @@ package body Sem_Ch8 is
-- Common case for compilation unit
- elsif Defining_Entity (N => Parent (N),
- Empty_On_Errors => True) = Current_Scope
- then
+ elsif Defining_Entity (Parent (N)) = Current_Scope then
null;
else
-- If declaration appears in some other scope, it must be in some
-- parent unit when compiling a child.
- Pack := Defining_Entity (Parent (N), Empty_On_Errors => True);
+ Pack := Defining_Entity (Parent (N));
if not In_Open_Scopes (Pack) then
null;
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index b74f88d0461..ee0c49ba40c 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -5544,13 +5544,23 @@ package body Sem_Elab is
N_Procedure_Instantiation)
and then Nkind (Context) = N_Compilation_Unit
then
- return
- Related_Instance (Defining_Entity (N, Concurrent_Subunit => True));
+ return Related_Instance (Defining_Entity (N));
+
+ -- The unit denotes a concurrent body acting as a subunit. Such bodies
+ -- are generally rewritten into null statements. The proper entity is
+ -- that of the "original node".
+
+ elsif Nkind (N) = N_Subunit
+ and then Nkind (Proper_Body (N)) = N_Null_Statement
+ and then Nkind_In (Original_Node (Proper_Body (N)), N_Protected_Body,
+ N_Task_Body)
+ then
+ return Defining_Entity (Original_Node (Proper_Body (N)));
-- Otherwise the proper entity is the defining entity
else
- return Defining_Entity (N, Concurrent_Subunit => True);
+ return Defining_Entity (N);
end if;
end Find_Unit_Entity;
diff --git a/gcc/ada/sem_spark.adb b/gcc/ada/sem_spark.adb
index cfa6df81854..439d29fe9dc 100644
--- a/gcc/ada/sem_spark.adb
+++ b/gcc/ada/sem_spark.adb
@@ -804,7 +804,7 @@ package body Sem_SPARK is
if Present (SPARK_Pragma (Defining_Entity (Body_N))) then
if Get_SPARK_Mode_From_Annotation
- (SPARK_Pragma (Defining_Entity (Body_N, False))) /= Opt.On
+ (SPARK_Pragma (Defining_Entity (Body_N))) /= Opt.On
then
return;
end if;
@@ -1914,7 +1914,7 @@ package body Sem_SPARK is
CorSp : Node_Id;
begin
- if Present (SPARK_Pragma (Defining_Entity (Pack, False))) then
+ if Present (SPARK_Pragma (Defining_Entity (Pack))) then
if Get_SPARK_Mode_From_Annotation
(SPARK_Pragma (Defining_Entity (Pack))) /= Opt.On
then
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 16c671111e4..eedfaf1376e 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -5827,11 +5827,7 @@ package body Sem_Util is
-- Defining_Entity --
---------------------
- function Defining_Entity
- (N : Node_Id;
- Empty_On_Errors : Boolean := False;
- Concurrent_Subunit : Boolean := False) return Entity_Id
- is
+ function Defining_Entity (N : Node_Id) return Entity_Id is
begin
case Nkind (N) is
when N_Abstract_Subprogram_Declaration
@@ -5882,24 +5878,11 @@ package body Sem_Util is
=>
return Defining_Identifier (N);
- when N_Subunit =>
- declare
- Bod : constant Node_Id := Proper_Body (N);
- Orig_Bod : constant Node_Id := Original_Node (Bod);
-
- begin
- -- Retrieve the entity of the original protected or task body
- -- if requested by the caller.
+ when N_Compilation_Unit =>
+ return Defining_Entity (Unit (N));
- if Concurrent_Subunit
- and then Nkind (Bod) = N_Null_Statement
- and then Nkind_In (Orig_Bod, N_Protected_Body, N_Task_Body)
- then
- return Defining_Entity (Orig_Bod);
- else
- return Defining_Entity (Bod);
- end if;
- end;
+ when N_Subunit =>
+ return Defining_Entity (Proper_Body (N));
when N_Function_Instantiation
| N_Function_Specification
@@ -5925,14 +5908,10 @@ package body Sem_Util is
-- can continue semantic analysis.
elsif Nam = Error then
- if Empty_On_Errors then
- return Empty;
- else
- Err := Make_Temporary (Sloc (N), 'T');
- Set_Defining_Unit_Name (N, Err);
+ Err := Make_Temporary (Sloc (N), 'T');
+ Set_Defining_Unit_Name (N, Err);
- return Err;
- end if;
+ return Err;
-- If not an entity, get defining identifier
@@ -5947,11 +5926,7 @@ package body Sem_Util is
return Entity (Identifier (N));
when others =>
- if Empty_On_Errors then
- return Empty;
- else
- raise Program_Error;
- end if;
+ raise Program_Error;
end case;
end Defining_Entity;
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 4e4d4ba8826..f098ea44d97 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -543,10 +543,7 @@ package Sem_Util is
-- in the case of a descendant of a generic formal type (returns Int'Last
-- instead of 0).
- function Defining_Entity
- (N : Node_Id;
- Empty_On_Errors : Boolean := False;
- Concurrent_Subunit : Boolean := False) return Entity_Id;
+ function Defining_Entity (N : Node_Id) return Entity_Id;
-- Given a declaration N, returns the associated defining entity. If the
-- declaration has a specification, the entity is obtained from the
-- specification. If the declaration has a defining unit name, then the
@@ -557,22 +554,6 @@ package Sem_Util is
-- local entities declared during loop expansion. These entities need
-- debugging information, generated through Qualify_Entity_Names, and
-- the loop declaration must be placed in the table Name_Qualify_Units.
- --
- -- Set flag Empty_On_Error to change the behavior of this routine as
- -- follows:
- --
- -- * True - A declaration that lacks a defining entity returns Empty.
- -- A node that does not allow for a defining entity returns Empty.
- --
- -- * False - A declaration that lacks a defining entity is given a new
- -- internally generated entity which is subsequently returned. A node
- -- that does not allow for a defining entity raises Program_Error.
- --
- -- The former semantics is appropriate for the back end; the latter
- -- semantics is appropriate for the front end.
- --
- -- Set flag Concurrent_Subunit to handle rewritings of concurrent bodies
- -- which act as subunits. Such bodies are generally rewritten as null.
function Denotes_Discriminant
(N : Node_Id;
diff --git a/gcc/common/config/s390/s390-common.c b/gcc/common/config/s390/s390-common.c
index f9c3a95f897..2e1914e3768 100644
--- a/gcc/common/config/s390/s390-common.c
+++ b/gcc/common/config/s390/s390-common.c
@@ -47,9 +47,9 @@ EXPORTED_CONST int processor_flags_table[] =
/* z14 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
| PF_EXTIMM | PF_DFP | PF_Z10 | PF_Z196 | PF_ZEC12 | PF_TX
| PF_Z13 | PF_VX | PF_VXE | PF_Z14,
- /* arch13 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
+ /* z15 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
| PF_EXTIMM | PF_DFP | PF_Z10 | PF_Z196 | PF_ZEC12 | PF_TX
- | PF_Z13 | PF_VX | PF_VXE | PF_Z14 | PF_VXE2 | PF_ARCH13
+ | PF_Z13 | PF_VX | PF_VXE | PF_Z14 | PF_VXE2 | PF_Z15
};
/* Change optimizations to be performed, depending on the
diff --git a/gcc/config.gcc b/gcc/config.gcc
index ddd3b8f4d9d..f5027bb289b 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4743,7 +4743,7 @@ case "${target}" in
for which in arch tune; do
eval "val=\$with_$which"
case ${val} in
- "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 )
+ "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 )
# OK
;;
*)
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index f08cd0930b3..cc5a887d404 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1059,8 +1059,8 @@
(match_operand:GPI 1 "general_operand" ""))]
""
"
- if (MEM_P (operands[0]) && CONST_INT_P (operands[1])
- && <MODE>mode == DImode
+ if (MEM_P (operands[0]) && !MEM_VOLATILE_P (operands[0])
+ && CONST_INT_P (operands[1]) && <MODE>mode == DImode
&& aarch64_split_dimode_const_store (operands[0], operands[1]))
DONE;
diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
index 7719c3b6352..3c6d1cc90ad 100644
--- a/gcc/config/aarch64/aarch64.opt
+++ b/gcc/config/aarch64/aarch64.opt
@@ -119,15 +119,15 @@ EnumValue
Enum(aarch64_tls_size) String(48) Value(48)
march=
-Target RejectNegative ToLower Joined Var(aarch64_arch_string)
+Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
Use features of architecture ARCH.
mcpu=
-Target RejectNegative ToLower Joined Var(aarch64_cpu_string)
+Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
Use features of and optimize for CPU.
mtune=
-Target RejectNegative ToLower Joined Var(aarch64_tune_string)
+Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
Optimize for CPU.
mabi=
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 984540f0b53..524379d3763 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -8839,6 +8839,9 @@ alpha_handle_trap_shadows (void)
case CODE_LABEL:
goto close_shadow;
+ case DEBUG_INSN:
+ break;
+
default:
gcc_unreachable ();
}
diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
index 9067d491b9c..78f3878e037 100644
--- a/gcc/config/arm/arm.opt
+++ b/gcc/config/arm/arm.opt
@@ -82,7 +82,7 @@ mapcs-stack-check
Target Report Mask(APCS_STACK) Undocumented
march=
-Target RejectNegative ToLower Joined Var(arm_arch_string)
+Target RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
Specify the name of the target architecture.
; Other arm_arch values are loaded from arm-tables.opt
@@ -107,7 +107,7 @@ Target Report Mask(CALLER_INTERWORKING)
Thumb: Assume function pointers may go to non-Thumb aware code.
mcpu=
-Target RejectNegative ToLower Joined Var(arm_cpu_string)
+Target RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
Specify the name of the target CPU.
mfloat-abi=
@@ -232,7 +232,7 @@ Target Report Mask(TPCS_LEAF_FRAME)
Thumb: Generate (leaf) stack frames even if not needed.
mtune=
-Target RejectNegative ToLower Joined Var(arm_tune_string)
+Target RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
Tune code for the given processor.
mprint-tune-info
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 0e253cb0dfa..e8fe90728e8 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -126,6 +126,24 @@ extern GTY(()) int darwin_ms_struct;
"%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} \
%<gsplit-dwarf"
+#if LD64_HAS_EXPORT_DYNAMIC
+#define DARWIN_RDYNAMIC "%{rdynamic:-export_dynamic}"
+#else
+#define DARWIN_RDYNAMIC "%{rdynamic:%nrdynamic is not supported}"
+#endif
+
+/* FIXME: we should check that the linker supports the -pie and -no_pie.
+ options. */
+#define DARWIN_PIE_SPEC \
+"%{pie|fpie|fPIE:\
+ %{mdynamic-no-pic: \
+ %n'-mdynamic-no-pic' overrides '-pie', '-fpie' or '-fPIE'; \
+ :%:version-compare(>= 10.5 mmacosx-version-min= -pie) }} "
+
+#define DARWIN_NOPIE_SPEC \
+"%{no-pie|fno-pie|fno-PIE: \
+ %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) }"
+
#define DARWIN_CC1_SPEC \
"%{findirect-virtual-calls: -fapple-kext} %<findirect-virtual-calls " \
"%{fterminated-vtables: -fapple-kext} %<fterminated-vtables " \
@@ -156,6 +174,16 @@ extern GTY(()) int darwin_ms_struct;
#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}" \
" %{pthread:-D_REENTRANT}"
+/* This is a fix for PR41260 by passing -no_compact_unwind on darwin10 and
+ later until the assembler, linker and libunwind are able to deal with the
+ output from GCC.
+
+ FIXME: we should check that the linker supports the option.
+*/
+
+#define DARWIN_NOCOMPACT_UNWIND \
+" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) "
+
/* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus
precomp, libtool, and fat build additions.
@@ -164,12 +192,6 @@ extern GTY(()) int darwin_ms_struct;
specifying the handling of options understood by generic Unix
linkers, and for positional arguments like libraries. */
-#if LD64_HAS_EXPORT_DYNAMIC
-#define DARWIN_EXPORT_DYNAMIC " %{rdynamic:-export_dynamic}"
-#else
-#define DARWIN_EXPORT_DYNAMIC " %{rdynamic: %nrdynamic is not supported}"
-#endif
-
#define LINK_COMMAND_SPEC_A \
"%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker)" \
@@ -190,10 +212,14 @@ extern GTY(()) int darwin_ms_struct;
%{%:sanitize(address): -lasan } \
%{%:sanitize(undefined): -lubsan } \
%(link_ssp) \
- " DARWIN_EXPORT_DYNAMIC " %<rdynamic \
%(link_gcc_c_sequence) \
}}}\
- %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}"
+ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} %{F*} "\
+ DARWIN_PIE_SPEC \
+ DARWIN_NOPIE_SPEC \
+ DARWIN_RDYNAMIC \
+ DARWIN_NOCOMPACT_UNWIND \
+ "}}}}}}} %<pie %<no-pie %<rdynamic "
#define DSYMUTIL "\ndsymutil"
@@ -230,8 +256,6 @@ extern GTY(()) int darwin_ms_struct;
#define STANDARD_STARTFILE_PREFIX_1 ""
#define STANDARD_STARTFILE_PREFIX_2 ""
-#define DARWIN_PIE_SPEC "%{fpie|pie|fPIE:}"
-
/* Please keep the random linker options in alphabetical order (modulo
'Z' and 'no' prefixes). Note that options taking arguments may appear
multiple times on a command line with different arguments each time,
@@ -295,7 +319,6 @@ extern GTY(()) int darwin_ms_struct;
%:version-compare(< 10.5 mmacosx-version-min= -multiply_defined) \
%:version-compare(< 10.5 mmacosx-version-min= suppress)}} \
%{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
- " DARWIN_PIE_SPEC " \
%{prebind} %{noprebind} %{nofixprebinding} %{prebind_all_twolevel_modules} \
%{read_only_relocs} \
%{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} \
diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h
index 07a2b465a04..a6d1eba6ebd 100644
--- a/gcc/config/darwin10.h
+++ b/gcc/config/darwin10.h
@@ -18,17 +18,12 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* Fix PR41260 by passing -no_compact_unwind on darwin10 and later until
- unwinder in libSystem is fixed to digest new epilog unwinding notes.
+/* Fix PR47558 by linking against libSystem ahead of libgcc_ext. */
- Fix PR47558 by linking against libSystem ahead of libgcc_ext. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC \
-"%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \
- %{!static:%{!static-libgcc: \
+"%{!static:%{!static-libgcc: \
%:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \
- %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \
- %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } \
%{!nostdlib:%:version-compare(>< 10.6 10.7 mmacosx-version-min= -ld10-uwfef.o)} \
%G %{!nolibc:%L}"
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
index ca5c51718c8..1fd1604aed8 100644
--- a/gcc/config/darwin9.h
+++ b/gcc/config/darwin9.h
@@ -35,12 +35,6 @@ along with GCC; see the file COPYING3. If not see
/* Tell collect2 to run dsymutil for us as necessary. */
#define COLLECT_RUN_DSYMUTIL 1
-#undef DARWIN_PIE_SPEC
-#define DARWIN_PIE_SPEC \
- "%{fpie|pie|fPIE: \
- %{mdynamic-no-pic: %n'-mdynamic-no-pic' overrides '-pie', '-fpie' or '-fPIE'; \
- :-pie}}"
-
/* Only ask as for debug data if the debug style is stabs (since as doesn't
yet generate dwarf.) */
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 2dfc7c73cce..d758fbf1be6 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_)
can forward SRC for DEST. This is most useful if the next insn is a
simple store. */
rtx_insn *insn = (rtx_insn *)insn_;
- struct mips_address_info addr;
+ struct mips_address_info addr = {};
if (insn)
{
rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_)
{
rtx tmp = XEXP (src, 0);
mips_classify_address (&addr, tmp, GET_MODE (tmp), true);
- if (REGNO (addr.reg) != REGNO (dest))
+ if (addr.reg && !reg_overlap_mentioned_p (dest, addr.reg))
validate_change (next, &SET_SRC (set), src, false);
}
else
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 1e85658a0f7..663ce878fd3 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -8052,20 +8052,22 @@ pa_output_call (rtx_insn *insn, rtx call_dest, int sibcall)
{
output_asm_insn ("addil LT'%0,%%r19", xoperands);
output_asm_insn ("ldw RT'%0(%%r1),%%r1", xoperands);
- output_asm_insn ("ldw 0(%%r1),%%r1", xoperands);
+ output_asm_insn ("ldw 0(%%r1),%%r22", xoperands);
}
else
{
output_asm_insn ("addil LR'%0-$global$,%%r27",
xoperands);
- output_asm_insn ("ldw RR'%0-$global$(%%r1),%%r1",
+ output_asm_insn ("ldw RR'%0-$global$(%%r1),%%r22",
xoperands);
}
- output_asm_insn ("bb,>=,n %%r1,30,.+16", xoperands);
- output_asm_insn ("depi 0,31,2,%%r1", xoperands);
- output_asm_insn ("ldw 4(%%sr0,%%r1),%%r19", xoperands);
- output_asm_insn ("ldw 0(%%sr0,%%r1),%%r1", xoperands);
+ output_asm_insn ("bb,>=,n %%r22,30,.+16", xoperands);
+ output_asm_insn ("depi 0,31,2,%%r22", xoperands);
+ /* Should this be an ordered load to ensure the target
+ address is loaded before the global pointer? */
+ output_asm_insn ("ldw 0(%%r22),%%r1", xoperands);
+ output_asm_insn ("ldw 4(%%r22),%%r19", xoperands);
if (!sibcall && !TARGET_PA_20)
{
@@ -8158,10 +8160,6 @@ pa_attr_length_indirect_call (rtx_insn *insn)
if (TARGET_PORTABLE_RUNTIME)
return 16;
- /* Inline version of $$dyncall. */
- if ((TARGET_NO_SPACE_REGS || TARGET_PA_20) && !optimize_size)
- return 20;
-
if (!TARGET_LONG_CALLS
&& ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
|| distance < MAX_PCREL17F_OFFSET))
@@ -8171,12 +8169,15 @@ pa_attr_length_indirect_call (rtx_insn *insn)
if (!flag_pic)
return 12;
- /* Inline version of $$dyncall. */
- if (TARGET_NO_SPACE_REGS || TARGET_PA_20)
- return 20;
-
+ /* Inline versions of $$dyncall. */
if (!optimize_size)
- return 36;
+ {
+ if (TARGET_NO_SPACE_REGS)
+ return 28;
+
+ if (TARGET_PA_20)
+ return 32;
+ }
/* Long PIC pc-relative call. */
return 20;
@@ -8214,22 +8215,6 @@ pa_output_indirect_call (rtx_insn *insn, rtx call_dest)
return "blr %%r0,%%r2\n\tbv,n %%r0(%%r31)";
}
- /* Maybe emit a fast inline version of $$dyncall. */
- if ((TARGET_NO_SPACE_REGS || TARGET_PA_20) && !optimize_size)
- {
- output_asm_insn ("bb,>=,n %%r22,30,.+12\n\t"
- "ldw 2(%%r22),%%r19\n\t"
- "ldw -2(%%r22),%%r22", xoperands);
- pa_output_arg_descriptor (insn);
- if (TARGET_NO_SPACE_REGS)
- {
- if (TARGET_PA_20)
- return "bve,l,n (%%r22),%%r2\n\tnop";
- return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2";
- }
- return "bve,l (%%r22),%%r2\n\tstw %%r2,-24(%%sp)";
- }
-
/* Now the normal case -- we can reach $$dyncall directly or
we're sure that we can get there via a long-branch stub.
@@ -8258,35 +8243,40 @@ pa_output_indirect_call (rtx_insn *insn, rtx call_dest)
return "ble R'$$dyncall(%%sr4,%%r2)\n\tcopy %%r31,%%r2";
}
- /* Maybe emit a fast inline version of $$dyncall. The long PIC
- pc-relative call sequence is five instructions. The inline PA 2.0
- version of $$dyncall is also five instructions. The PA 1.X versions
- are longer but still an overall win. */
- if (TARGET_NO_SPACE_REGS || TARGET_PA_20 || !optimize_size)
+ /* The long PIC pc-relative call sequence is five instructions. So,
+ let's use an inline version of $$dyncall when the calling sequence
+ has a roughly similar number of instructions and we are not optimizing
+ for size. We need two instructions to load the return pointer plus
+ the $$dyncall implementation. */
+ if (!optimize_size)
{
- output_asm_insn ("bb,>=,n %%r22,30,.+12\n\t"
- "ldw 2(%%r22),%%r19\n\t"
- "ldw -2(%%r22),%%r22", xoperands);
if (TARGET_NO_SPACE_REGS)
{
pa_output_arg_descriptor (insn);
- if (TARGET_PA_20)
- return "bve,l,n (%%r22),%%r2\n\tnop";
- return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2";
+ output_asm_insn ("bl .+8,%rp\b\t"
+ "ldo 20(%r2),%r2\n\t"
+ "extru,<> %r22,30,1,%r0\n\t"
+ "bv,n %%r0(%r22)\n\t"
+ "ldw -2(%%r22),%%r21\n\t"
+ "bv %%r0(%r21)\n\t"
+ "ldw 2(%%r22),%%r19", xoperands);
+ return "";
}
if (TARGET_PA_20)
{
pa_output_arg_descriptor (insn);
- return "bve,l (%%r22),%%r2\n\tstw %%r2,-24(%%sp)";
+ output_asm_insn ("bl .+8,%%r2\b\t"
+ "ldo 24(%%r2),%%r2\n\t"
+ "stw %%r2,-24(%%sp)\n\t"
+ "extru,<> %r22,30,1,%r0\n\t"
+ "bve,n (%%r22)\n\t"
+ "ldw -2(%%r22),%%r21\n\t"
+ "bve (%%r21)\n\t"
+ "ldw 2(%%r22),%%r19", xoperands);
+ return "";
}
- output_asm_insn ("bl .+8,%%r2\n\t"
- "ldo 16(%%r2),%%r2\n\t"
- "ldsid (%%r22),%%r1\n\t"
- "mtsp %%r1,%%sr0", xoperands);
- pa_output_arg_descriptor (insn);
- return "be 0(%%sr0,%%r22)\n\tstw %%r2,-24(%%sp)";
}
-
+
/* We need a long PIC call to $$dyncall. */
xoperands[0] = gen_rtx_SYMBOL_REF (Pmode, "$$dyncall");
xoperands[1] = gen_rtx_REG (Pmode, 2);
@@ -10048,7 +10038,7 @@ pa_modes_tieable_p (machine_mode mode1, machine_mode mode2)
/* Length in units of the trampoline instruction code. */
-#define TRAMPOLINE_CODE_SIZE (TARGET_64BIT ? 24 : (TARGET_PA_20 ? 32 : 40))
+#define TRAMPOLINE_CODE_SIZE (TARGET_64BIT ? 24 : (TARGET_PA_20 ? 36 : 48))
/* Output assembler code for a block containing the constant parts
@@ -10069,27 +10059,46 @@ pa_asm_trampoline_template (FILE *f)
{
if (!TARGET_64BIT)
{
- fputs ("\tldw 36(%r22),%r21\n", f);
- fputs ("\tbb,>=,n %r21,30,.+16\n", f);
- if (ASSEMBLER_DIALECT == 0)
- fputs ("\tdepi 0,31,2,%r21\n", f);
- else
- fputs ("\tdepwi 0,31,2,%r21\n", f);
- fputs ("\tldw 4(%r21),%r19\n", f);
- fputs ("\tldw 0(%r21),%r21\n", f);
if (TARGET_PA_20)
{
- fputs ("\tbve (%r21)\n", f);
- fputs ("\tldw 40(%r22),%r29\n", f);
+ fputs ("\tmfia %r20\n", f);
+ fputs ("\tldw 48(%r20),%r22\n", f);
+ fputs ("\tcopy %r22,%r21\n", f);
+ fputs ("\tbb,>=,n %r22,30,.+16\n", f);
+ fputs ("\tdepwi 0,31,2,%r22\n", f);
+ fputs ("\tldw 0(%r22),%r21\n", f);
+ fputs ("\tldw 4(%r22),%r19\n", f);
+ fputs ("\tbve (%r21)\n", f);
+ fputs ("\tldw 52(%r1),%r29\n", f);
+ fputs ("\t.word 0\n", f);
fputs ("\t.word 0\n", f);
fputs ("\t.word 0\n", f);
}
else
{
+ if (ASSEMBLER_DIALECT == 0)
+ {
+ fputs ("\tbl .+8,%r20\n", f);
+ fputs ("\tdepi 0,31,2,%r20\n", f);
+ }
+ else
+ {
+ fputs ("\tb,l .+8,%r20\n", f);
+ fputs ("\tdepwi 0,31,2,%r20\n", f);
+ }
+ fputs ("\tldw 40(%r20),%r22\n", f);
+ fputs ("\tcopy %r22,%r21\n", f);
+ fputs ("\tbb,>=,n %r22,30,.+16\n", f);
+ if (ASSEMBLER_DIALECT == 0)
+ fputs ("\tdepi 0,31,2,%r22\n", f);
+ else
+ fputs ("\tdepwi 0,31,2,%r22\n", f);
+ fputs ("\tldw 0(%r22),%r21\n", f);
+ fputs ("\tldw 4(%r22),%r19\n", f);
fputs ("\tldsid (%r21),%r1\n", f);
fputs ("\tmtsp %r1,%sr0\n", f);
- fputs ("\tbe 0(%sr0,%r21)\n", f);
- fputs ("\tldw 40(%r22),%r29\n", f);
+ fputs ("\tbe 0(%sr0,%r21)\n", f);
+ fputs ("\tldw 44(%r20),%r29\n", f);
}
fputs ("\t.word 0\n", f);
fputs ("\t.word 0\n", f);
@@ -10103,11 +10112,11 @@ pa_asm_trampoline_template (FILE *f)
fputs ("\t.dword 0\n", f);
fputs ("\t.dword 0\n", f);
fputs ("\tmfia %r31\n", f);
- fputs ("\tldd 24(%r31),%r1\n", f);
- fputs ("\tldd 24(%r1),%r27\n", f);
- fputs ("\tldd 16(%r1),%r1\n", f);
- fputs ("\tbve (%r1)\n", f);
+ fputs ("\tldd 24(%r31),%r27\n", f);
fputs ("\tldd 32(%r31),%r31\n", f);
+ fputs ("\tldd 16(%r27),%r1\n", f);
+ fputs ("\tbve (%r1)\n", f);
+ fputs ("\tldd 24(%r27),%r27\n", f);
fputs ("\t.dword 0 ; fptr\n", f);
fputs ("\t.dword 0 ; static link\n", f);
}
@@ -10117,10 +10126,10 @@ pa_asm_trampoline_template (FILE *f)
FNADDR is an RTX for the address of the function's pure code.
CXT is an RTX for the static chain value for the function.
- Move the function address to the trampoline template at offset 36.
- Move the static chain value to trampoline template at offset 40.
- Move the trampoline address to trampoline template at offset 44.
- Move r19 to trampoline template at offset 48. The latter two
+ Move the function address to the trampoline template at offset 48.
+ Move the static chain value to trampoline template at offset 52.
+ Move the trampoline address to trampoline template at offset 56.
+ Move r19 to trampoline template at offset 60. The latter two
words create a plabel for the indirect call to the trampoline.
A similar sequence is used for the 64-bit port but the plabel is
@@ -10146,15 +10155,15 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
if (!TARGET_64BIT)
{
- tmp = adjust_address (m_tramp, Pmode, 36);
+ tmp = adjust_address (m_tramp, Pmode, 48);
emit_move_insn (tmp, fnaddr);
- tmp = adjust_address (m_tramp, Pmode, 40);
+ tmp = adjust_address (m_tramp, Pmode, 52);
emit_move_insn (tmp, chain_value);
/* Create a fat pointer for the trampoline. */
- tmp = adjust_address (m_tramp, Pmode, 44);
+ tmp = adjust_address (m_tramp, Pmode, 56);
emit_move_insn (tmp, r_tramp);
- tmp = adjust_address (m_tramp, Pmode, 48);
+ tmp = adjust_address (m_tramp, Pmode, 60);
emit_move_insn (tmp, gen_rtx_REG (Pmode, 19));
/* fdc and fic only use registers for the address to flush,
@@ -10213,13 +10222,13 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
/* Perform any machine-specific adjustment in the address of the trampoline.
ADDR contains the address that was passed to pa_trampoline_init.
- Adjust the trampoline address to point to the plabel at offset 44. */
+ Adjust the trampoline address to point to the plabel at offset 56. */
static rtx
pa_trampoline_adjust_address (rtx addr)
{
if (!TARGET_64BIT)
- addr = memory_address (Pmode, plus_constant (Pmode, addr, 46));
+ addr = memory_address (Pmode, plus_constant (Pmode, addr, 58));
return addr;
}
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 561efa51882..385feb27033 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -689,7 +689,7 @@ extern int may_call_alloca;
/* Length in units of the trampoline for entering a nested function. */
-#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 52)
+#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 64)
/* Alignment required by the trampoline. */
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index 0a2bdb79e15..4d4f3b3e746 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -1177,26 +1177,26 @@ BU_ALTIVEC_X (MTVSCR, "mtvscr", MISC)
BU_ALTIVEC_X (MFVSCR, "mfvscr", MISC)
BU_ALTIVEC_X (DSSALL, "dssall", MISC)
BU_ALTIVEC_X (DSS, "dss", MISC)
-BU_ALTIVEC_X (LVSL, "lvsl", MEM)
-BU_ALTIVEC_X (LVSR, "lvsr", MEM)
-BU_ALTIVEC_X (LVEBX, "lvebx", MEM)
-BU_ALTIVEC_X (LVEHX, "lvehx", MEM)
-BU_ALTIVEC_X (LVEWX, "lvewx", MEM)
-BU_ALTIVEC_X (LVXL, "lvxl", MEM)
-BU_ALTIVEC_X (LVXL_V2DF, "lvxl_v2df", MEM)
-BU_ALTIVEC_X (LVXL_V2DI, "lvxl_v2di", MEM)
-BU_ALTIVEC_X (LVXL_V4SF, "lvxl_v4sf", MEM)
-BU_ALTIVEC_X (LVXL_V4SI, "lvxl_v4si", MEM)
-BU_ALTIVEC_X (LVXL_V8HI, "lvxl_v8hi", MEM)
-BU_ALTIVEC_X (LVXL_V16QI, "lvxl_v16qi", MEM)
-BU_ALTIVEC_X (LVX, "lvx", MEM)
-BU_ALTIVEC_X (LVX_V1TI, "lvx_v1ti", MEM)
-BU_ALTIVEC_X (LVX_V2DF, "lvx_v2df", MEM)
-BU_ALTIVEC_X (LVX_V2DI, "lvx_v2di", MEM)
-BU_ALTIVEC_X (LVX_V4SF, "lvx_v4sf", MEM)
-BU_ALTIVEC_X (LVX_V4SI, "lvx_v4si", MEM)
-BU_ALTIVEC_X (LVX_V8HI, "lvx_v8hi", MEM)
-BU_ALTIVEC_X (LVX_V16QI, "lvx_v16qi", MEM)
+BU_ALTIVEC_X (LVSL, "lvsl", PURE)
+BU_ALTIVEC_X (LVSR, "lvsr", PURE)
+BU_ALTIVEC_X (LVEBX, "lvebx", PURE)
+BU_ALTIVEC_X (LVEHX, "lvehx", PURE)
+BU_ALTIVEC_X (LVEWX, "lvewx", PURE)
+BU_ALTIVEC_X (LVXL, "lvxl", PURE)
+BU_ALTIVEC_X (LVXL_V2DF, "lvxl_v2df", PURE)
+BU_ALTIVEC_X (LVXL_V2DI, "lvxl_v2di", PURE)
+BU_ALTIVEC_X (LVXL_V4SF, "lvxl_v4sf", PURE)
+BU_ALTIVEC_X (LVXL_V4SI, "lvxl_v4si", PURE)
+BU_ALTIVEC_X (LVXL_V8HI, "lvxl_v8hi", PURE)
+BU_ALTIVEC_X (LVXL_V16QI, "lvxl_v16qi", PURE)
+BU_ALTIVEC_X (LVX, "lvx", PURE)
+BU_ALTIVEC_X (LVX_V1TI, "lvx_v1ti", PURE)
+BU_ALTIVEC_X (LVX_V2DF, "lvx_v2df", PURE)
+BU_ALTIVEC_X (LVX_V2DI, "lvx_v2di", PURE)
+BU_ALTIVEC_X (LVX_V4SF, "lvx_v4sf", PURE)
+BU_ALTIVEC_X (LVX_V4SI, "lvx_v4si", PURE)
+BU_ALTIVEC_X (LVX_V8HI, "lvx_v8hi", PURE)
+BU_ALTIVEC_X (LVX_V16QI, "lvx_v16qi", PURE)
BU_ALTIVEC_X (STVX, "stvx", MEM)
BU_ALTIVEC_X (STVX_V2DF, "stvx_v2df", MEM)
BU_ALTIVEC_X (STVX_V2DI, "stvx_v2di", MEM)
@@ -1204,10 +1204,10 @@ BU_ALTIVEC_X (STVX_V4SF, "stvx_v4sf", MEM)
BU_ALTIVEC_X (STVX_V4SI, "stvx_v4si", MEM)
BU_ALTIVEC_X (STVX_V8HI, "stvx_v8hi", MEM)
BU_ALTIVEC_X (STVX_V16QI, "stvx_v16qi", MEM)
-BU_ALTIVEC_C (LVLX, "lvlx", MEM)
-BU_ALTIVEC_C (LVLXL, "lvlxl", MEM)
-BU_ALTIVEC_C (LVRX, "lvrx", MEM)
-BU_ALTIVEC_C (LVRXL, "lvrxl", MEM)
+BU_ALTIVEC_C (LVLX, "lvlx", PURE)
+BU_ALTIVEC_C (LVLXL, "lvlxl", PURE)
+BU_ALTIVEC_C (LVRX, "lvrx", PURE)
+BU_ALTIVEC_C (LVRXL, "lvrxl", PURE)
BU_ALTIVEC_X (STVEBX, "stvebx", MEM)
BU_ALTIVEC_X (STVEHX, "stvehx", MEM)
BU_ALTIVEC_X (STVEWX, "stvewx", MEM)
@@ -1718,15 +1718,15 @@ BU_VSX_P (XVCMPGEDP_P, "xvcmpgedp_p", CONST, vector_ge_v2df_p)
BU_VSX_P (XVCMPGTDP_P, "xvcmpgtdp_p", CONST, vector_gt_v2df_p)
/* VSX builtins that are handled as special cases. */
-BU_VSX_X (LXSDX, "lxsdx", MEM)
-BU_VSX_X (LXVD2X_V1TI, "lxvd2x_v1ti", MEM)
-BU_VSX_X (LXVD2X_V2DF, "lxvd2x_v2df", MEM)
-BU_VSX_X (LXVD2X_V2DI, "lxvd2x_v2di", MEM)
-BU_VSX_X (LXVDSX, "lxvdsx", MEM)
-BU_VSX_X (LXVW4X_V4SF, "lxvw4x_v4sf", MEM)
-BU_VSX_X (LXVW4X_V4SI, "lxvw4x_v4si", MEM)
-BU_VSX_X (LXVW4X_V8HI, "lxvw4x_v8hi", MEM)
-BU_VSX_X (LXVW4X_V16QI, "lxvw4x_v16qi", MEM)
+BU_VSX_X (LXSDX, "lxsdx", PURE)
+BU_VSX_X (LXVD2X_V1TI, "lxvd2x_v1ti", PURE)
+BU_VSX_X (LXVD2X_V2DF, "lxvd2x_v2df", PURE)
+BU_VSX_X (LXVD2X_V2DI, "lxvd2x_v2di", PURE)
+BU_VSX_X (LXVDSX, "lxvdsx", PURE)
+BU_VSX_X (LXVW4X_V4SF, "lxvw4x_v4sf", PURE)
+BU_VSX_X (LXVW4X_V4SI, "lxvw4x_v4si", PURE)
+BU_VSX_X (LXVW4X_V8HI, "lxvw4x_v8hi", PURE)
+BU_VSX_X (LXVW4X_V16QI, "lxvw4x_v16qi", PURE)
BU_VSX_X (STXSDX, "stxsdx", MEM)
BU_VSX_X (STXVD2X_V1TI, "stxvd2x_v1ti", MEM)
BU_VSX_X (STXVD2X_V2DF, "stxvd2x_v2df", MEM)
@@ -1735,13 +1735,13 @@ BU_VSX_X (STXVW4X_V4SF, "stxvw4x_v4sf", MEM)
BU_VSX_X (STXVW4X_V4SI, "stxvw4x_v4si", MEM)
BU_VSX_X (STXVW4X_V8HI, "stxvw4x_v8hi", MEM)
BU_VSX_X (STXVW4X_V16QI, "stxvw4x_v16qi", MEM)
-BU_VSX_X (LD_ELEMREV_V1TI, "ld_elemrev_v1ti", MEM)
-BU_VSX_X (LD_ELEMREV_V2DF, "ld_elemrev_v2df", MEM)
-BU_VSX_X (LD_ELEMREV_V2DI, "ld_elemrev_v2di", MEM)
-BU_VSX_X (LD_ELEMREV_V4SF, "ld_elemrev_v4sf", MEM)
-BU_VSX_X (LD_ELEMREV_V4SI, "ld_elemrev_v4si", MEM)
-BU_VSX_X (LD_ELEMREV_V8HI, "ld_elemrev_v8hi", MEM)
-BU_VSX_X (LD_ELEMREV_V16QI, "ld_elemrev_v16qi", MEM)
+BU_VSX_X (LD_ELEMREV_V1TI, "ld_elemrev_v1ti", PURE)
+BU_VSX_X (LD_ELEMREV_V2DF, "ld_elemrev_v2df", PURE)
+BU_VSX_X (LD_ELEMREV_V2DI, "ld_elemrev_v2di", PURE)
+BU_VSX_X (LD_ELEMREV_V4SF, "ld_elemrev_v4sf", PURE)
+BU_VSX_X (LD_ELEMREV_V4SI, "ld_elemrev_v4si", PURE)
+BU_VSX_X (LD_ELEMREV_V8HI, "ld_elemrev_v8hi", PURE)
+BU_VSX_X (LD_ELEMREV_V16QI, "ld_elemrev_v16qi", PURE)
BU_VSX_X (ST_ELEMREV_V1TI, "st_elemrev_v1ti", MEM)
BU_VSX_X (ST_ELEMREV_V2DF, "st_elemrev_v2df", MEM)
BU_VSX_X (ST_ELEMREV_V2DI, "st_elemrev_v2di", MEM)
diff --git a/gcc/config/rs6000/rs6000-p8swap.c b/gcc/config/rs6000/rs6000-p8swap.c
index c3b98315503..d30e5dec980 100644
--- a/gcc/config/rs6000/rs6000-p8swap.c
+++ b/gcc/config/rs6000/rs6000-p8swap.c
@@ -791,6 +791,11 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
case UNSPEC_REDUC_PLUS:
case UNSPEC_REDUC:
return 1;
+ case UNSPEC_VPMSUM:
+ /* vpmsumd is not swappable, but vpmsum[bhw] are. */
+ if (GET_MODE (op) == V2DImode)
+ return 0;
+ break;
}
}
diff --git a/gcc/config/s390/8561.md b/gcc/config/s390/8561.md
index e5a345f4dba..2442349271b 100644
--- a/gcc/config/s390/8561.md
+++ b/gcc/config/s390/8561.md
@@ -1,4 +1,4 @@
-;; Scheduling description for arch13.
+;; Scheduling description for z15.
;; Copyright (C) 2019 Free Software Foundation, Inc.
;; Contributed by Robin Dapp (rdapp@linux.ibm.com)
;; This file is part of GCC.
@@ -17,12 +17,12 @@
;; along with GCC; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>.
-(define_attr "arch13_unit_fpd" ""
+(define_attr "z15_unit_fpd" ""
(cond [(eq_attr "mnemonic" "ddb,ddbr,deb,debr,dxbr,sqdb,sqdbr,sqeb,\
sqebr,sqxbr,vfddb,vfdsb,vfsqdb,vfsqsb,wfddb,wfdsb,wfdxb,wfsqdb,wfsqxb")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_unit_fxa" ""
+(define_attr "z15_unit_fxa" ""
(cond [(eq_attr "mnemonic" "a,afi,ag,agf,agfi,agfr,agh,aghi,aghik,\
agr,agrk,ah,ahi,ahik,ahy,al,alc,alcg,alcgr,alcr,alfi,alg,algf,algfi,algfr,\
alghsik,algr,algrk,alhsik,alr,alrk,aly,ar,ark,ay,bras,brasl,etnd,exrl,flogr,\
@@ -39,7 +39,7 @@ slgrk,sll,sllg,sllk,slr,slrk,sly,sr,sra,srag,srak,srk,srl,srlg,srlk,sy,x,xg,\
xgr,xgrk,xihf,xilf,xr,xrk,xy")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_unit_fxb" ""
+(define_attr "z15_unit_fxb" ""
(cond [(eq_attr "mnemonic" "agsi,algsi,alsi,asi,b,bc,bcr,bi,br,brcl,\
c,cfi,cg,cgf,cgfi,cgfr,cgfrl,cgh,cghi,cghrl,cghsi,cgit,cgr,cgrl,cgrt,ch,\
chi,chrl,chsi,chy,cit,cl,clfhsi,clfi,clfit,clg,clgf,clgfi,clgfr,clgfrl,\
@@ -52,11 +52,11 @@ tmhl,tml,tmlh,tmll,tmy,vlgvb,vlgvf,vlgvg,vlgvh,vlr,vlvgb,vlvgf,vlvgg,vlvgh,\
vlvgp,vst,vstef,vsteg,vstl,vstrl,vstrlr,xi,xiy")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_unit_fxd" ""
+(define_attr "z15_unit_fxd" ""
(cond [(eq_attr "mnemonic" "dlgr,dlr,dr,dsgfr,dsgr")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_unit_lsu" ""
+(define_attr "z15_unit_lsu" ""
(cond [(eq_attr "mnemonic" "a,adb,aeb,ag,agf,agh,agsi,ah,ahy,al,alc,\
alcg,alg,algf,algsi,alsi,aly,asi,ay,c,cdb,ceb,cg,cgf,cgfrl,cgh,cghrl,cghsi,\
cgrl,ch,chrl,chsi,chy,cl,clc,clfhsi,clg,clgf,clgfrl,clghrl,clghsi,clgrl,\
@@ -73,7 +73,7 @@ vllezf,vllezg,vllezh,vllezlf,vlrepb,vlrepf,vlrepg,vlreph,vlrl,vlrlr,vst,\
vstef,vsteg,vstl,vstrl,vstrlr,x,xg,xi,xiy,xy")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_unit_vfu" ""
+(define_attr "z15_unit_vfu" ""
(cond [(eq_attr "mnemonic" "adb,adbr,adtr,aeb,aebr,axbr,axtr,cdb,\
cdbr,cdtr,ceb,cebr,cpsdr,cxbr,cxtr,ddtr,dxtr,fidbr,fidbra,fidtr,fiebr,\
fiebra,fixbr,fixbra,fixtr,lcdbr,lcebr,lcxbr,ldeb,ldebr,ldetr,le,ledbr,ledtr,\
@@ -115,7 +115,7 @@ wflpxb,wfmadb,wfmasb,wfmaxb,wfmaxxb,wfmdb,wfminxb,wfmsb,wfmsdb,wfmssb,wfmsxb,\
wfmxb,wfnmaxb,wfnmsxb,wfsdb,wfssb,wfsxb,wldeb,wledb")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_cracked" ""
+(define_attr "z15_cracked" ""
(cond [(eq_attr "mnemonic" "bas,basr,cdfbr,cdftr,cdgbr,cdgtr,cdlfbr,\
cdlftr,cdlgbr,cdlgtr,cefbr,cegbr,celfbr,celgbr,cfdbr,cfebr,cfxbr,cgdbr,cgdtr,\
cgebr,cgxbr,cgxtr,chhsi,clfdbr,clfdtr,clfebr,clfxbr,clfxtr,clgdbr,clgdtr,\
@@ -123,13 +123,13 @@ clgebr,clgxbr,clgxtr,cs,csg,csy,d,efpc,ex,lcgfr,lngfr,lpgfr,lpq,lxr,lzxr,\
rxsbg,stpq,vgef,vgeg,vscef,vsceg,vsteb,vsteh")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_expanded" ""
+(define_attr "z15_expanded" ""
(cond [(eq_attr "mnemonic" "cds,cdsg,cdsy,cxfbr,cxftr,cxgbr,cxgtr,\
cxlfbr,cxlftr,cxlgbr,cxlgtr,dl,dlg,dsg,dsgf,lam,lm,lmg,lmy,sldl,srda,srdl,\
stam,stm,stmg,stmy,tbegin,tbeginc")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_groupalone" ""
+(define_attr "z15_groupalone" ""
(cond [(eq_attr "mnemonic" "alc,alcg,alcgr,alcr,axbr,axtr,clc,cxbr,\
cxtr,dlgr,dlr,dr,dsgfr,dsgr,dxbr,dxtr,fixbr,fixbra,fixtr,flogr,lcxbr,lnxbr,\
lpxbr,ltxbr,ltxtr,lxdb,lxdbr,lxdtr,lxeb,lxebr,m,madb,maeb,maebr,mfy,mg,mgrk,\
@@ -137,11 +137,11 @@ ml,mlg,mlgr,mlr,mr,msdb,mseb,msebr,mvc,mxbr,mxtr,nc,oc,ppa,sfpc,slb,slbg,\
slbgr,slbr,sqxbr,sxbr,sxtr,tabort,tcxb,tdcxt,tend,xc")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_endgroup" ""
+(define_attr "z15_endgroup" ""
(cond [(eq_attr "mnemonic" "bras,brasl,exrl,ipm")
(const_int 1)] (const_int 0)))
-(define_attr "arch13_groupoftwo" ""
+(define_attr "z15_groupoftwo" ""
(cond [(eq_attr "mnemonic" "vacccq,vacq,vfmadb,vfmasb,vfmsdb,vfmssb,\
vfnmadb,vfnmasb,vfnmsdb,vfnmssb,vgfmab,vgfmaf,vgfmag,vgfmah,vmaeb,vmaef,vmaeh,\
vmahb,vmahf,vmahh,vmalb,vmaleb,vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,\
@@ -149,8 +149,8 @@ vmalhw,vmalob,vmalof,vmaloh,vmaob,vmaof,vmaoh,vmslg,vperm,vsbcbiq,vsbiq,vsel,\
wfmadb,wfmasb,wfmaxb,wfmsdb,wfmssb,wfmsxb,wfnmaxb,wfnmsxb")
(const_int 1)] (const_int 0)))
-(define_insn_reservation "arch13_0" 0
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_0" 0
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "a,afi,ag,agfi,aghi,aghik,agr,agrk,ahi,ahik,al,\
alfi,alg,algf,algfi,algfr,alghsik,algr,algrk,alhsik,alr,alrk,aly,ar,ark,ay,\
b,bc,bcr,bi,br,bras,brasl,brcl,c,cfi,cg,cgfi,cghi,cghsi,cgit,cgr,cgrl,\
@@ -168,8 +168,8 @@ sllk,slr,slrk,sly,sr,sra,srag,srak,srda,srdl,srk,srl,srlg,srlk,sy,tm,tmh,\
tmhh,tmhl,tml,tmlh,tmll,tmy,vlr,vlvgb,vlvgf,vlvgg,vlvgh,x,xg,xgr,xgrk,xihf,\
xilf,xr,xrk,xy")) "nothing")
-(define_insn_reservation "arch13_1" 1
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_1" 1
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "agf,agfr,agh,agsi,ah,ahy,algsi,alsi,asi,cgf,\
cgfr,cgfrl,cgh,cghrl,ch,chrl,chy,clm,clmy,cpsdr,laa,laag,lan,lang,lao,laog,\
lax,laxg,le,ler,ley,loc,locg,locghi,locgr,lochi,locr,mvghi,mvhhi,mvhi,mvi,\
@@ -196,8 +196,8 @@ wfcedb,wfcesb,wfcexb,wfchdb,wfchedb,wfchesb,wfchexb,wfchsb,wfchxb,wflcdb,\
wflcsb,wflcxb,wflndb,wflnsb,wflnxb,wflpdb,wflpsb,wflpxb,wfmaxxb,wfminxb,xi,\
xiy")) "nothing")
-(define_insn_reservation "arch13_2" 2
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_2" 2
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cdb,cdbr,ceb,cebr,ear,ipm,l,lcbb,lcdbr,lcebr,ld,\
lde,ldy,lg,lgdr,lgrl,llc,llgc,llgf,llgfrl,llgh,llghrl,llgt,llh,llhrl,lm,\
lmg,lmy,lndbr,lnebr,lpdbr,lpebr,lrl,ltdbr,ltebr,ly,popcnt,sar,tcdb,tceb,\
@@ -208,8 +208,8 @@ vistrh,vlgvb,vlgvf,vlgvg,vlgvh,vllezb,vllezf,vllezg,vllezh,vllezlf,vlrepb,\
vlrepf,vlrepg,vlreph,vlrl,vlvgp,vpklsfs,vpklsgs,vpklshs,vpksfs,vpksgs,vpkshs,\
wfcdb,wfcexbs,wfchexbs,wfchxbs,wfcsb")) "nothing")
-(define_insn_reservation "arch13_3" 3
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_3" 3
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cds,cdsy,mgh,mghi,mh,mhi,mhy,std,stdy,ste,stey,\
vcksm,vfeezbs,vfeezfs,vfeezhs,vgfmab,vgfmaf,vgfmag,vgfmah,vgfmb,vgfmf,vgfmg,\
vgfmh,vistrbs,vistrfs,vistrhs,vl,vlbb,vll,vlrlr,vmaeb,vmaef,vmaeh,vmahb,\
@@ -218,14 +218,14 @@ vmalob,vmalof,vmaloh,vmaob,vmaof,vmaoh,vmeb,vmef,vmeh,vmhb,vmhf,vmhh,vmlb,\
vmleb,vmlef,vmleh,vmlf,vmlhb,vmlhf,vmlhh,vmlhw,vmlob,vmlof,vmloh,vmob,vmof,\
vmoh,vsumb,vsumgf,vsumgh,vsumh,vsumqf,vsumqg,vtm")) "nothing")
-(define_insn_reservation "arch13_4" 4
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_4" 4
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "bas,basr,chhsi,clc,ex,lam,lcgfr,lngfr,lpgfr,lxr,\
lzxr,ms,msfi,msgf,msgfi,msgfr,msr,msy,mvc,nc,oc,ppa,rxsbg,tabort,tbegin,\
tbeginc,tend,vst,vstef,vsteg,vstl,vstrl,vstrlr,xc")) "nothing")
-(define_insn_reservation "arch13_5" 5
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_5" 5
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "adb,adbr,aeb,aebr,alc,alcg,alcgr,alcr,cs,csg,\
csy,fidbr,fidbra,fiebr,fiebra,ldeb,ldebr,ledbr,madbr,mdb,mdbr,meeb,meebr,\
msdbr,msrkc,sdb,sdbr,seb,sebr,slb,slbg,slbgr,slbr,stm,stmg,stmy,vfadb,vfasb,\
@@ -233,53 +233,53 @@ vfidb,vfisb,vfmadb,vfmasb,vfmdb,vfmsb,vfmsdb,vfmssb,vfnmadb,vfnmasb,vfnmsdb,\
vfnmssb,vfsdb,vfssb,vldeb,vledb,vmslg,wfadb,wfasb,wfidb,wfisb,wflld,wfmadb,\
wfmasb,wfmdb,wfmsb,wfmsdb,wfmssb,wfsdb,wfssb,wldeb,wledb")) "nothing")
-(define_insn_reservation "arch13_6" 6
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_6" 6
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "msg,msgr,sfpc")) "nothing")
-(define_insn_reservation "arch13_7" 7
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_7" 7
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "adtr,cdtr,fidtr,ldetr,ltdtr,msgrkc,sdtr,tdcdt,\
tdcet,vgef,vgeg")) "nothing")
-(define_insn_reservation "arch13_8" 8
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_8" 8
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cdsg,flogr,lpq,stpq,vsteb,vsteh")) "nothing")
-(define_insn_reservation "arch13_9" 9
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_9" 9
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cdfbr,cdgbr,cdlfbr,cdlgbr,cefbr,cegbr,celfbr,\
celgbr,cxfbr,cxgbr,cxlfbr,cxlgbr,m,madb,maeb,maebr,mfy,ml,mlr,mr,msdb,mseb,\
msebr,stam,wfaxb,wfixb,wfsxb")) "nothing")
-(define_insn_reservation "arch13_10" 10
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_10" 10
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "lxdb,lxdbr,lxeb,lxebr,vscef,vsceg")) "nothing")
-(define_insn_reservation "arch13_11" 11
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_11" 11
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cfdbr,cfebr,cgdbr,cgebr,clfdbr,clfebr,clgdbr,\
clgebr,mg,mgrk,mlg,mlgr")) "nothing")
-(define_insn_reservation "arch13_12" 12
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_12" 12
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cxbr,cxftr,cxlftr,cxtr,tcxb,tdcxt")) "nothing")
-(define_insn_reservation "arch13_13" 13
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_13" 13
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "axbr,axtr,fixbr,fixbra,fixtr,lcxbr,lnxbr,lpxbr,\
ltxbr,ltxtr,lxdtr,sxbr,sxtr")) "nothing")
-(define_insn_reservation "arch13_14" 14
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_14" 14
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cfxbr,cgxbr,clfxbr,clgxbr,ledtr")) "nothing")
-(define_insn_reservation "arch13_16" 16
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_16" 16
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cdftr,cdlftr")) "nothing")
-(define_insn_reservation "arch13_20" 20
- (and (eq_attr "cpu" "arch13")
+(define_insn_reservation "z15_20" 20
+ (and (eq_attr "cpu" "z15")
(eq_attr "mnemonic" "cdgtr,cdlgtr,cgdtr,cgxtr,clfdtr,clfxtr,clgdtr,\
clgxtr,cxgtr,cxlgtr,d,ddb,ddbr,ddtr,deb,debr,dl,dlg,dlgr,dlr,dr,dsg,dsgf,\
dsgfr,dsgr,dxbr,dxtr,efpc,mdtr,mxbr,mxtr,sqdb,sqdbr,sqeb,sqebr,sqxbr,vfddb,\
diff --git a/gcc/config/s390/driver-native.c b/gcc/config/s390/driver-native.c
index a386d633a87..6bc7d590668 100644
--- a/gcc/config/s390/driver-native.c
+++ b/gcc/config/s390/driver-native.c
@@ -121,10 +121,10 @@ s390_host_detect_local_cpu (int argc, const char **argv)
break;
case 0x8561:
case 0x8562:
- cpu = "arch13";
+ cpu = "z15";
break;
default:
- cpu = "arch13";
+ cpu = "z15";
break;
}
}
diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def
index fbf7d9f50e8..3f39b9d3b88 100644
--- a/gcc/config/s390/s390-builtins.def
+++ b/gcc/config/s390/s390-builtins.def
@@ -281,7 +281,7 @@
#define B_HTM (1 << 1) /* Builtins requiring the transactional execution facility. */
#define B_VX (1 << 2) /* Builtins requiring the z13 vector extensions. */
#define B_VXE (1 << 3) /* Builtins requiring the z14 vector extensions. */
-#define B_VXE2 (1 << 4) /* Builtins requiring the arch13 vector extensions. */
+#define B_VXE2 (1 << 4) /* Builtins requiring the z15 vector extensions. */
#define B_DEP (1 << 5) /* Builtin has been deprecated and a warning should be issued. */
/* B_DEF defines a standard (not overloaded) builtin
diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c
index 97debdc3905..c2f9b507011 100644
--- a/gcc/config/s390/s390-c.c
+++ b/gcc/config/s390/s390-c.c
@@ -905,6 +905,12 @@ s390_resolve_overloaded_builtin (location_t loc,
return error_mark_node;
}
+ if (!TARGET_VXE2 && (ob_flags & B_VXE2))
+ {
+ error_at (loc, "%qF requires z15 or higher", ob_fndecl);
+ return error_mark_node;
+ }
+
ob_fcode -= S390_BUILTIN_MAX;
for (b_arg_chain = TYPE_ARG_TYPES (TREE_TYPE (ob_fndecl));
@@ -983,6 +989,15 @@ s390_resolve_overloaded_builtin (location_t loc,
return error_mark_node;
}
+
+ if (!TARGET_VXE2
+ && bflags_overloaded_builtin_var[last_match_index] & B_VXE2)
+ {
+ error_at (loc, "%qs matching variant requires z15 or higher",
+ IDENTIFIER_POINTER (DECL_NAME (ob_fndecl)));
+ return error_mark_node;
+ }
+
if (bflags_overloaded_builtin_var[last_match_index] & B_DEP)
warning_at (loc, 0, "%qs matching variant is deprecated.",
IDENTIFIER_POINTER (DECL_NAME (ob_fndecl)));
diff --git a/gcc/config/s390/s390-opts.h b/gcc/config/s390/s390-opts.h
index ab41cb883f3..502edea719b 100644
--- a/gcc/config/s390/s390-opts.h
+++ b/gcc/config/s390/s390-opts.h
@@ -37,7 +37,7 @@ enum processor_type
PROCESSOR_2827_ZEC12,
PROCESSOR_2964_Z13,
PROCESSOR_3906_Z14,
- PROCESSOR_8561_ARCH13,
+ PROCESSOR_8561_Z15,
PROCESSOR_NATIVE,
PROCESSOR_max
};
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index fc4571d0d0c..21aaae1fdbd 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -337,7 +337,7 @@ const struct s390_processor processor_table[] =
{ "zEC12", "zEC12", PROCESSOR_2827_ZEC12, &zEC12_cost, 10 },
{ "z13", "z13", PROCESSOR_2964_Z13, &zEC12_cost, 11 },
{ "z14", "arch12", PROCESSOR_3906_Z14, &zEC12_cost, 12 },
- { "arch13", "", PROCESSOR_8561_ARCH13, &zEC12_cost, 13 },
+ { "z15", "arch13", PROCESSOR_8561_Z15, &zEC12_cost, 13 },
{ "native", "", PROCESSOR_NATIVE, NULL, 0 }
};
@@ -811,6 +811,12 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
error ("Builtin %qF requires z14 or higher.", fndecl);
return const0_rtx;
}
+
+ if ((bflags & B_VXE2) && !TARGET_VXE2)
+ {
+ error ("Builtin %qF requires z15 or higher.", fndecl);
+ return const0_rtx;
+ }
}
if (fcode >= S390_OVERLOADED_BUILTIN_VAR_OFFSET
&& fcode < S390_ALL_BUILTIN_MAX)
@@ -1795,7 +1801,7 @@ s390_canonicalize_comparison (int *code, rtx *op0, rtx *op1,
}
/* ~a==b -> ~(a^b)==0 ~a!=b -> ~(a^b)!=0 */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& (*code == EQ || *code == NE)
&& (GET_MODE (*op0) == DImode || GET_MODE (*op0) == SImode)
&& GET_CODE (*op0) == NOT)
@@ -1807,7 +1813,7 @@ s390_canonicalize_comparison (int *code, rtx *op0, rtx *op1,
}
/* a&b == -1 -> ~a|~b == 0 a|b == -1 -> ~a&~b == 0 */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& (*code == EQ || *code == NE)
&& (GET_CODE (*op0) == AND || GET_CODE (*op0) == IOR)
&& (GET_MODE (*op0) == DImode || GET_MODE (*op0) == SImode)
@@ -3529,7 +3535,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code,
/* It is a real IF-THEN-ELSE. An additional move will be
needed to implement that. */
- if (!TARGET_ARCH13
+ if (!TARGET_Z15
&& reload_completed
&& !rtx_equal_p (dst, then)
&& !rtx_equal_p (dst, els))
@@ -3551,7 +3557,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code,
case IOR:
/* nnrk, nngrk */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& (mode == SImode || mode == DImode)
&& GET_CODE (XEXP (x, 0)) == NOT
&& GET_CODE (XEXP (x, 1)) == NOT)
@@ -3598,7 +3604,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code,
case AND:
/* nork, nogrk */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& (mode == SImode || mode == DImode)
&& GET_CODE (XEXP (x, 0)) == NOT
&& GET_CODE (XEXP (x, 1)) == NOT)
@@ -3770,7 +3776,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code,
*total = COSTS_N_INSNS (1);
/* nxrk, nxgrk ~(a^b)==0 */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& GET_CODE (XEXP (x, 0)) == NOT
&& XEXP (x, 1) == const0_rtx
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == XOR
@@ -3785,7 +3791,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code,
}
/* nnrk, nngrk, nork, nogrk */
- if (TARGET_ARCH13
+ if (TARGET_Z15
&& (GET_CODE (XEXP (x, 0)) == AND || GET_CODE (XEXP (x, 0)) == IOR)
&& XEXP (x, 1) == const0_rtx
&& (GET_MODE (XEXP (x, 0)) == SImode || GET_MODE (XEXP (x, 0)) == DImode)
@@ -14440,16 +14446,16 @@ s390_get_sched_attrmask (rtx_insn *insn)
if (get_attr_z14_groupoftwo (insn))
mask |= S390_SCHED_ATTR_MASK_GROUPOFTWO;
break;
- case PROCESSOR_8561_ARCH13:
- if (get_attr_arch13_cracked (insn))
+ case PROCESSOR_8561_Z15:
+ if (get_attr_z15_cracked (insn))
mask |= S390_SCHED_ATTR_MASK_CRACKED;
- if (get_attr_arch13_expanded (insn))
+ if (get_attr_z15_expanded (insn))
mask |= S390_SCHED_ATTR_MASK_EXPANDED;
- if (get_attr_arch13_endgroup (insn))
+ if (get_attr_z15_endgroup (insn))
mask |= S390_SCHED_ATTR_MASK_ENDGROUP;
- if (get_attr_arch13_groupalone (insn))
+ if (get_attr_z15_groupalone (insn))
mask |= S390_SCHED_ATTR_MASK_GROUPALONE;
- if (get_attr_arch13_groupoftwo (insn))
+ if (get_attr_z15_groupoftwo (insn))
mask |= S390_SCHED_ATTR_MASK_GROUPOFTWO;
break;
default:
@@ -14487,15 +14493,15 @@ s390_get_unit_mask (rtx_insn *insn, int *units)
if (get_attr_z14_unit_vfu (insn))
mask |= 1 << 3;
break;
- case PROCESSOR_8561_ARCH13:
+ case PROCESSOR_8561_Z15:
*units = 4;
- if (get_attr_arch13_unit_lsu (insn))
+ if (get_attr_z15_unit_lsu (insn))
mask |= 1 << 0;
- if (get_attr_arch13_unit_fxa (insn))
+ if (get_attr_z15_unit_fxa (insn))
mask |= 1 << 1;
- if (get_attr_arch13_unit_fxb (insn))
+ if (get_attr_z15_unit_fxb (insn))
mask |= 1 << 2;
- if (get_attr_arch13_unit_vfu (insn))
+ if (get_attr_z15_unit_vfu (insn))
mask |= 1 << 3;
break;
default:
@@ -14511,7 +14517,7 @@ s390_is_fpd (rtx_insn *insn)
return false;
return get_attr_z13_unit_fpd (insn) || get_attr_z14_unit_fpd (insn)
- || get_attr_arch13_unit_fpd (insn);
+ || get_attr_z15_unit_fpd (insn);
}
static bool
@@ -14521,7 +14527,7 @@ s390_is_fxd (rtx_insn *insn)
return false;
return get_attr_z13_unit_fxd (insn) || get_attr_z14_unit_fxd (insn)
- || get_attr_arch13_unit_fxd (insn);
+ || get_attr_z15_unit_fxd (insn);
}
/* Returns TRUE if INSN is a long-running instruction. */
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 969f58a2ba0..f7023d985f1 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -41,12 +41,12 @@ enum processor_flags
PF_Z14 = 2048,
PF_VXE = 4096,
PF_VXE2 = 8192,
- PF_ARCH13 = 16384
+ PF_Z15 = 16384
};
/* This is necessary to avoid a warning about comparing different enum
types. */
-#define s390_tune_attr ((enum attr_cpu)(s390_tune > PROCESSOR_8561_ARCH13 ? PROCESSOR_8561_ARCH13 : s390_tune ))
+#define s390_tune_attr ((enum attr_cpu)(s390_tune > PROCESSOR_8561_Z15 ? PROCESSOR_8561_Z15 : s390_tune ))
/* These flags indicate that the generated code should run on a cpu
providing the respective hardware facility regardless of the
@@ -100,10 +100,10 @@ enum processor_flags
(s390_arch_flags & PF_VXE)
#define TARGET_CPU_VXE_P(opts) \
(opts->x_s390_arch_flags & PF_VXE)
-#define TARGET_CPU_ARCH13 \
- (s390_arch_flags & PF_ARCH13)
-#define TARGET_CPU_ARCH13_P(opts) \
- (opts->x_s390_arch_flags & PF_ARCH13)
+#define TARGET_CPU_Z15 \
+ (s390_arch_flags & PF_Z15)
+#define TARGET_CPU_Z15_P(opts) \
+ (opts->x_s390_arch_flags & PF_Z15)
#define TARGET_CPU_VXE2 \
(s390_arch_flags & PF_VXE2)
#define TARGET_CPU_VXE2_P(opts) \
@@ -160,9 +160,9 @@ enum processor_flags
(TARGET_VX && TARGET_CPU_VXE)
#define TARGET_VXE_P(opts) \
(TARGET_VX_P (opts) && TARGET_CPU_VXE_P (opts))
-#define TARGET_ARCH13 (TARGET_ZARCH && TARGET_CPU_ARCH13)
-#define TARGET_ARCH13_P(opts) \
- (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_ARCH13_P (opts))
+#define TARGET_Z15 (TARGET_ZARCH && TARGET_CPU_Z15)
+#define TARGET_Z15_P(opts) \
+ (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z15_P (opts))
#define TARGET_VXE2 \
(TARGET_VX && TARGET_CPU_VXE2)
#define TARGET_VXE2_P(opts) \
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 714d8b00a80..5a3496ac92e 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -513,11 +513,11 @@
;; Processor type. This attribute must exactly match the processor_type
;; enumeration in s390.h.
-(define_attr "cpu" "z900,z990,z9_109,z9_ec,z10,z196,zEC12,z13,z14,arch13"
+(define_attr "cpu" "z900,z990,z9_109,z9_ec,z10,z196,zEC12,z13,z14,z15"
(const (symbol_ref "s390_tune_attr")))
(define_attr "cpu_facility"
- "standard,ieee,zarch,cpu_zarch,longdisp,extimm,dfp,z10,z196,zEC12,vx,z13,z14,vxe,arch13,vxe2"
+ "standard,ieee,zarch,cpu_zarch,longdisp,extimm,dfp,z10,z196,zEC12,vx,z13,z14,vxe,z15,vxe2"
(const_string "standard"))
(define_attr "enabled" ""
@@ -575,8 +575,8 @@
(match_test "TARGET_VXE"))
(const_int 1)
- (and (eq_attr "cpu_facility" "arch13")
- (match_test "TARGET_ARCH13"))
+ (and (eq_attr "cpu_facility" "z15")
+ (match_test "TARGET_Z15"))
(const_int 1)
(and (eq_attr "cpu_facility" "vxe2")
@@ -613,7 +613,7 @@
;; Pipeline description for z14
(include "3906.md")
-;; Pipeline description for arch13
+;; Pipeline description for z15
(include "8561.md")
;; Predicates
@@ -642,7 +642,7 @@
(define_mode_iterator DD_DF [DF DD])
(define_mode_iterator TD_TF [TF TD])
-; 32 bit int<->fp conversion instructions are available since VXE2 (arch13).
+; 32 bit int<->fp conversion instructions are available since VXE2 (z15).
(define_mode_iterator VX_CONV_BFP [DF (SF "TARGET_VXE2")])
(define_mode_iterator VX_CONV_INT [DI (SI "TARGET_VXE2")])
@@ -6749,7 +6749,7 @@
stoc<g>%C1\t%3,%0
stoc<g>%D1\t%4,%0"
[(set_attr "op_type" "RRF,RRF,RRF,RSY,RSY,RIE,RIE,RSY,RSY")
- (set_attr "cpu_facility" "*,*,arch13,*,*,z13,z13,*,*")])
+ (set_attr "cpu_facility" "*,*,z15,*,*,z13,z13,*,*")])
;;
;;- Multiply instructions.
@@ -7568,7 +7568,7 @@
(and:GPR (not:GPR (match_operand:GPR 1 "nonimmediate_operand" ""))
(match_operand:GPR 2 "general_operand" "")))
(clobber (reg:CC CC_REGNUM))]
- "!TARGET_ARCH13
+ "!TARGET_Z15
&& ! reload_completed
&& (GET_CODE (operands[0]) != MEM
/* Ensure that s390_logical_operator_ok_p will succeed even
@@ -7925,7 +7925,7 @@
(set (match_operand:GPR 0 "register_operand" "=d")
(ANDOR:GPR (not:GPR (match_dup 1))
(match_dup 2)))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"<ANDOR:noxa>c<GPR:g>rk\t%0,%2,%1"
[(set_attr "op_type" "RRF")])
@@ -7937,7 +7937,7 @@
(match_operand:GPR 2 "register_operand" "d"))
(const_int 0)))
(clobber (match_scratch:GPR 0 "=d"))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"<ANDOR:noxa>c<GPR:g>rk\t%0,%2,%1"
[(set_attr "op_type" "RRF")])
@@ -7947,7 +7947,7 @@
(ANDOR:GPR (not:GPR (match_operand:GPR 1 "register_operand" "d"))
(match_operand:GPR 2 "register_operand" "d")))
(clobber (reg:CC CC_REGNUM))]
- "TARGET_ARCH13"
+ "TARGET_Z15"
"<ANDOR:noxa>c<GPR:g>rk\t%0,%2,%1"
[(set_attr "op_type" "RRF")])
@@ -7965,7 +7965,7 @@
(set (match_operand:GPR 0 "register_operand" "=d")
(ANDOR:GPR (not:GPR (match_dup 1))
(not:GPR (match_dup 2))))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"n<ANDOR:inv_no><GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -7977,7 +7977,7 @@
(not:GPR (match_operand:GPR 2 "register_operand" "d")))
(const_int 0)))
(clobber (match_scratch:GPR 0 "=d"))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"n<ANDOR:inv_no><GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -7987,7 +7987,7 @@
(ANDOR:GPR (not:GPR (match_operand:GPR 1 "register_operand" "d"))
(not:GPR (match_operand:GPR 2 "register_operand" "d"))))
(clobber (reg:CC CC_REGNUM))]
- "TARGET_ARCH13"
+ "TARGET_Z15"
"n<ANDOR:inv_no><GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -8371,7 +8371,7 @@
(set (match_operand:GPR 0 "register_operand" "=d")
(xor:GPR (not:GPR (match_dup 1))
(match_dup 2)))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"nx<GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -8383,7 +8383,7 @@
(match_operand:GPR 2 "register_operand" "d")))
(const_int 0)))
(clobber (match_scratch:GPR 0 "=d"))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"nx<GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -8393,7 +8393,7 @@
(not:GPR (xor:GPR (match_operand:GPR 1 "register_operand" "d")
(match_operand:GPR 2 "register_operand" "d"))))
(clobber (reg:CC CC_REGNUM))]
- "TARGET_ARCH13"
+ "TARGET_Z15"
"nx<GPR:g>rk\t%0,%1,%2"
[(set_attr "op_type" "RRF")])
@@ -11351,34 +11351,34 @@
; Population count instruction
;
-(define_insn "*popcountdi_arch13_cc"
+(define_insn "*popcountdi_z15_cc"
[(set (reg CC_REGNUM)
(compare (popcount:DI (match_operand:DI 1 "register_operand" "d"))
(const_int 0)))
(set (match_operand:DI 0 "register_operand" "=d")
(match_dup 1))]
- "TARGET_ARCH13 && s390_match_ccmode (insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode (insn, CCTmode)"
"popcnt\t%0,%1,8"
[(set_attr "op_type" "RRF")])
-(define_insn "*popcountdi_arch13_cconly"
+(define_insn "*popcountdi_z15_cconly"
[(set (reg CC_REGNUM)
(compare (popcount:DI (match_operand:DI 1 "register_operand" "d"))
(const_int 0)))
(clobber (match_scratch:DI 0 "=d"))]
- "TARGET_ARCH13 && s390_match_ccmode(insn, CCTmode)"
+ "TARGET_Z15 && s390_match_ccmode(insn, CCTmode)"
"popcnt\t%0,%1,8"
[(set_attr "op_type" "RRF")])
-(define_insn "*popcountdi_arch13"
+(define_insn "*popcountdi_z15"
[(set (match_operand:DI 0 "register_operand" "=d")
(popcount:DI (match_operand:DI 1 "register_operand" "d")))
(clobber (reg:CC CC_REGNUM))]
- "TARGET_ARCH13"
+ "TARGET_Z15"
"popcnt\t%0,%1,8"
[(set_attr "op_type" "RRF")])
-; The pre-arch13 popcount instruction counts the bits of op1 in 8 byte
+; The pre-z15 popcount instruction counts the bits of op1 in 8 byte
; portions and stores the result in the corresponding bytes in op0.
(define_insn "*popcount<mode>_z196"
[(set (match_operand:INT 0 "register_operand" "=d")
@@ -11422,7 +11422,7 @@
(clobber (reg:CC CC_REGNUM))])]
"TARGET_Z196"
{
- if (!TARGET_ARCH13)
+ if (!TARGET_Z15)
{
emit_insn (gen_popcountdi2_z196 (operands[0], operands[1]));
DONE;
@@ -11453,7 +11453,7 @@
; popcount always counts on the full 64 bit. With the z196 version
; counting bits per byte we just ignore the upper 4 bytes. With the
-; arch13 version we have to zero out the upper 32 bits first.
+; z15 version we have to zero out the upper 32 bits first.
(define_expand "popcountsi2"
[(set (match_dup 2)
(zero_extend:DI (match_operand:SI 1 "register_operand")))
@@ -11463,7 +11463,7 @@
(subreg:SI (match_dup 3) 4))]
"TARGET_Z196"
{
- if (!TARGET_ARCH13)
+ if (!TARGET_Z15)
{
emit_insn (gen_popcountsi2_z196 (operands[0], operands[1]));
DONE;
@@ -11501,7 +11501,7 @@
(subreg:HI (match_dup 3) 6))]
"TARGET_Z196"
{
- if (!TARGET_ARCH13)
+ if (!TARGET_Z15)
{
emit_insn (gen_popcounthi2_z196 (operands[0], operands[1]));
DONE;
@@ -11516,7 +11516,7 @@
; For popcount on a single byte the old z196 style popcount
; instruction is ideal. Since it anyway does a byte-wise popcount we
; just use it instead of zero extending the QImode input to DImode and
-; using the arch13 popcount variant.
+; using the z15 popcount variant.
(define_expand "popcountqi2"
[; popcnt op0, op1
(parallel [(set (match_operand:QI 0 "register_operand" "")
diff --git a/gcc/config/s390/s390.opt b/gcc/config/s390/s390.opt
index 639f1679a56..6a6e1f75736 100644
--- a/gcc/config/s390/s390.opt
+++ b/gcc/config/s390/s390.opt
@@ -110,7 +110,10 @@ EnumValue
Enum(processor_type) String(arch12) Value(PROCESSOR_3906_Z14)
EnumValue
-Enum(processor_type) String(arch13) Value(PROCESSOR_8561_ARCH13)
+Enum(processor_type) String(z15) Value(PROCESSOR_8561_Z15)
+
+EnumValue
+Enum(processor_type) String(arch13) Value(PROCESSOR_8561_Z15)
EnumValue
Enum(processor_type) String(native) Value(PROCESSOR_NATIVE) DriverOnly
diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md
index 140ef474a92..21cc76534b1 100644
--- a/gcc/config/s390/vector.md
+++ b/gcc/config/s390/vector.md
@@ -70,7 +70,7 @@
(define_mode_iterator V_128_NOSINGLE [V16QI V8HI V4SI V4SF V2DI V2DF])
-; 32 bit int<->fp vector conversion instructions are available since VXE2 (arch13).
+; 32 bit int<->fp vector conversion instructions are available since VXE2 (z15).
(define_mode_iterator VX_VEC_CONV_BFP [V2DF (V4SF "TARGET_VXE2")])
(define_mode_iterator VX_VEC_CONV_INT [V2DI (V4SI "TARGET_VXE2")])
diff --git a/gcc/config/s390/vx-builtins.md b/gcc/config/s390/vx-builtins.md
index 3020bc94d3e..5ec3fb4fe58 100644
--- a/gcc/config/s390/vx-builtins.md
+++ b/gcc/config/s390/vx-builtins.md
@@ -2147,7 +2147,7 @@
"<vw>fmax<sdx>b\t%v0,%v1,%v2,%b3"
[(set_attr "op_type" "VRR")])
-; The element reversal builtins introduced with arch13 have been made
+; The element reversal builtins introduced with z15 have been made
; available also for older CPUs down to z13.
(define_expand "eltswap<mode>"
[(set (match_operand:VEC_HW 0 "nonimmediate_operand" "")
@@ -2181,8 +2181,8 @@
vster<bhfgq>\t%v1,%v0"
[(set_attr "op_type" "*,VRX,VRX")])
-; arch13 has instructions for doing element reversal from mem to reg
-; or the other way around. For reg to reg or on pre arch13 machines
+; z15 has instructions for doing element reversal from mem to reg
+; or the other way around. For reg to reg or on pre z15 machines
; we have to emulate it with vector permute.
(define_insn_and_split "*eltswap<mode>_emu"
[(set (match_operand:VEC_HW 0 "nonimmediate_operand" "=vR")
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 8dc79a764df..11440988f1a 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -664,6 +664,9 @@ static const struct attribute_spec sh_attribute_table[] =
#undef TARGET_CONSTANT_ALIGNMENT
#define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings
+#undef TARGET_HAVE_SPECULATION_SAFE_VALUE
+#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
+
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -737,7 +740,7 @@ got_mode_name:;
{
if (tokens[i] == "strict")
ret.strict = true;
- else if (tokens[i].find ("gbr-offset=") == 0)
+ else if (!tokens[i].compare (0, strlen ("gbr-offset="), "gbr-offset="))
{
std::string offset_str = tokens[i].substr (strlen ("gbr-offset="));
ret.tcb_gbr_offset = integral_argument (offset_str.c_str ());
@@ -958,11 +961,13 @@ sh_option_override (void)
if (flag_unsafe_math_optimizations)
{
/* Enable fsca insn for SH4A if not otherwise specified by the user. */
- if (global_options_set.x_TARGET_FSCA == 0 && TARGET_SH4A_FP)
+ if (global_options_set.x_TARGET_FSCA == 0
+ && (TARGET_SH4A_FP || TARGET_FPU_SH4_300))
TARGET_FSCA = 1;
/* Enable fsrra insn for SH4A if not otherwise specified by the user. */
- if (global_options_set.x_TARGET_FSRRA == 0 && TARGET_SH4A_FP)
+ if (global_options_set.x_TARGET_FSRRA == 0
+ && (TARGET_SH4A_FP || TARGET_FPU_SH4_300))
TARGET_FSRRA = 1;
}
@@ -12087,9 +12092,11 @@ sh_extending_set_of_reg::use_as_extended_reg (rtx_insn* use_at_insn) const
rtx r = gen_reg_rtx (SImode);
rtx_insn* i0;
if (from_mode == QImode)
- i0 = emit_insn_after (gen_extendqisi2 (r, set_src), insn);
+ i0 = sh_check_add_incdec_notes (
+ emit_insn_after (gen_extendqisi2 (r, set_src), insn));
else if (from_mode == HImode)
- i0 = emit_insn_after (gen_extendhisi2 (r, set_src), insn);
+ i0 = sh_check_add_incdec_notes (
+ emit_insn_after (gen_extendhisi2 (r, set_src), insn));
else
gcc_unreachable ();
@@ -12507,7 +12514,7 @@ static void
sh_emit_mode_set (int entity ATTRIBUTE_UNUSED, int mode,
int prev_mode, HARD_REG_SET regs_live ATTRIBUTE_UNUSED)
{
- if ((TARGET_SH4A_FP || TARGET_SH4_300)
+ if ((TARGET_SH4A_FP || TARGET_FPU_SH4_300)
&& prev_mode != FP_MODE_NONE && prev_mode != mode)
{
emit_insn (gen_toggle_pr ());
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 0204872eae7..9372fcfa699 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -69,6 +69,8 @@ extern int code_for_indirect_jump_scratch;
FPU is disabled (which makes it compatible with SH4al-dsp). */
#define TARGET_SH4A_FP (TARGET_SH4A && TARGET_FPU_ANY)
+/* True if the FPU is a SH4-300 variant. */
+#define TARGET_FPU_SH4_300 (TARGET_FPU_ANY && TARGET_SH4_300)
/* This is not used by the SH2E calling convention */
#define TARGET_VARARGS_PRETEND_ARGS(FUN_DECL) \
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 83543778619..fdb80d5d9d6 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -9163,7 +9163,7 @@
(xor:SI (reg:SI FPSCR_REG) (const_int FPSCR_PR)))
(set (reg:SI FPSCR_MODES_REG)
(unspec_volatile:SI [(const_int 0)] UNSPECV_FPSCR_MODES))]
- "TARGET_SH4A_FP"
+ "TARGET_SH4A_FP || TARGET_FPU_SH4_300"
"fpchg"
[(set_attr "type" "fpscr_toggle")])
@@ -9391,15 +9391,31 @@
(define_expand "negsf2"
[(set (match_operand:SF 0 "fp_arith_reg_operand")
(neg:SF (match_operand:SF 1 "fp_arith_reg_operand")))]
- "TARGET_SH2E")
+ "TARGET_FPU_ANY"
+{
+ if (TARGET_FPU_SH4_300)
+ emit_insn (gen_negsf2_fpscr (operands[0], operands[1]));
+ else
+ emit_insn (gen_negsf2_no_fpscr (operands[0], operands[1]));
+ DONE;
+})
-(define_insn "*negsf2_i"
+(define_insn "negsf2_no_fpscr"
[(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
(neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))]
- "TARGET_SH2E"
+ "TARGET_FPU_ANY && !TARGET_FPU_SH4_300"
"fneg %0"
[(set_attr "type" "fmove")])
+(define_insn "negsf2_fpscr"
+ [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
+ (neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))
+ (use (reg:SI FPSCR_MODES_REG))]
+ "TARGET_FPU_SH4_300"
+ "fneg %0"
+ [(set_attr "type" "fmove")
+ (set_attr "fp_mode" "single")])
+
(define_expand "sqrtsf2"
[(set (match_operand:SF 0 "fp_arith_reg_operand" "")
(sqrt:SF (match_operand:SF 1 "fp_arith_reg_operand" "")))]
@@ -9489,15 +9505,31 @@
(define_expand "abssf2"
[(set (match_operand:SF 0 "fp_arith_reg_operand")
(abs:SF (match_operand:SF 1 "fp_arith_reg_operand")))]
- "TARGET_SH2E")
+ "TARGET_FPU_ANY"
+{
+ if (TARGET_FPU_SH4_300)
+ emit_insn (gen_abssf2_fpscr (operands[0], operands[1]));
+ else
+ emit_insn (gen_abssf2_no_fpscr (operands[0], operands[1]));
+ DONE;
+})
-(define_insn "*abssf2_i"
+(define_insn "abssf2_no_fpscr"
[(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
(abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))]
- "TARGET_SH2E"
+ "TARGET_FPU_ANY && !TARGET_FPU_SH4_300"
"fabs %0"
[(set_attr "type" "fmove")])
+(define_insn "abssf2_fpscr"
+ [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
+ (abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))
+ (use (reg:SI FPSCR_MODES_REG))]
+ "TARGET_FPU_SH4_300"
+ "fabs %0"
+ [(set_attr "type" "fmove")
+ (set_attr "fp_mode" "single")])
+
(define_expand "adddf3"
[(set (match_operand:DF 0 "fp_arith_reg_operand" "")
(plus:DF (match_operand:DF 1 "fp_arith_reg_operand" "")
@@ -9673,12 +9705,28 @@
(define_expand "negdf2"
[(set (match_operand:DF 0 "fp_arith_reg_operand")
(neg:DF (match_operand:DF 1 "fp_arith_reg_operand")))]
- "TARGET_FPU_DOUBLE")
+ "TARGET_FPU_DOUBLE"
+{
+ if (TARGET_FPU_SH4_300)
+ emit_insn (gen_negdf2_fpscr (operands[0], operands[1]));
+ else
+ emit_insn (gen_negdf2_no_fpscr (operands[0], operands[1]));
+ DONE;
+})
-(define_insn "*negdf2_i"
+(define_insn "negdf2_fpscr"
+ [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f")
+ (neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))
+ (use (reg:SI FPSCR_MODES_REG))]
+ "TARGET_FPU_SH4_300"
+ "fneg %0"
+ [(set_attr "type" "fmove")
+ (set_attr "fp_mode" "double")])
+
+(define_insn "negdf2_no_fpscr"
[(set (match_operand:DF 0 "fp_arith_reg_operand" "=f")
(neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))]
- "TARGET_FPU_DOUBLE"
+ "TARGET_FPU_DOUBLE && !TARGET_FPU_SH4_300"
"fneg %0"
[(set_attr "type" "fmove")])
@@ -9704,15 +9752,31 @@
(define_expand "absdf2"
[(set (match_operand:DF 0 "fp_arith_reg_operand")
(abs:DF (match_operand:DF 1 "fp_arith_reg_operand")))]
- "TARGET_FPU_DOUBLE")
+ "TARGET_FPU_DOUBLE"
+{
+ if (TARGET_FPU_SH4_300)
+ emit_insn (gen_absdf2_fpscr (operands[0], operands[1]));
+ else
+ emit_insn (gen_absdf2_no_fpscr (operands[0], operands[1]));
+ DONE;
+})
-(define_insn "*absdf2_i"
+(define_insn "absdf2_no_fpscr"
[(set (match_operand:DF 0 "fp_arith_reg_operand" "=f")
(abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))]
- "TARGET_FPU_DOUBLE"
+ "TARGET_FPU_DOUBLE && !TARGET_FPU_SH4_300"
"fabs %0"
[(set_attr "type" "fmove")])
+(define_insn "absdf2_fpscr"
+ [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f")
+ (abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))
+ (use (reg:SI FPSCR_MODES_REG))]
+ "TARGET_FPU_SH4_300"
+ "fabs %0"
+ [(set_attr "type" "fmove")
+ (set_attr "fp_mode" "double")])
+
(define_expand "extendsfdf2"
[(set (match_operand:DF 0 "fp_arith_reg_operand" "")
(float_extend:DF (match_operand:SF 1 "fpul_operand" "")))]
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8bd42b83973..095d27f68d3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,30 @@
+2019-10-16 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-10-02 Richard Biener <rguenther@suse.de>
+
+ PR c++/91606
+ * decl.c (build_ptrmemfunc_type): Mark pointer-to-member
+ fat pointer structure members as DECL_NONADDRESSABLE_P.
+
+2019-10-08 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2019-09-15 Marek Polacek <polacek@redhat.com>
+
+ PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.
+ * pt.c (build_non_dependent_expr): Call build_non_dependent_expr for
+ the first operand.
+
+2019-09-28 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2019-09-28 Marek Polacek <polacek@redhat.com>
+
+ PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17.
+ * pt.c (invalid_nontype_parm_type_p): Only emit errors when
+ tf_error.
+
2019-09-10 Marek Polacek <polacek@redhat.com>
Backported from mainline
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e860f26e55d..2b207e4759b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9554,10 +9554,12 @@ build_ptrmemfunc_type (tree type)
TYPE_PTRMEMFUNC_FLAG (t) = 1;
field = build_decl (input_location, FIELD_DECL, pfn_identifier, type);
+ DECL_NONADDRESSABLE_P (field) = 1;
fields = field;
field = build_decl (input_location, FIELD_DECL, delta_identifier,
delta_type_node);
+ DECL_NONADDRESSABLE_P (field) = 1;
DECL_CHAIN (field) = fields;
fields = field;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b3fe901097c..442e01bfa11 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -25231,8 +25231,9 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)
{
if (cxx_dialect < cxx2a)
{
- error ("non-type template parameters of class type only available "
- "with %<-std=c++2a%> or %<-std=gnu++2a%>");
+ if (complain & tf_error)
+ error ("non-type template parameters of class type only available "
+ "with %<-std=c++2a%> or %<-std=gnu++2a%>");
return true;
}
if (dependent_type_p (type))
@@ -26714,7 +26715,7 @@ build_non_dependent_expr (tree expr)
if (TREE_CODE (expr) == COND_EXPR)
return build3 (COND_EXPR,
TREE_TYPE (expr),
- TREE_OPERAND (expr, 0),
+ build_non_dependent_expr (TREE_OPERAND (expr, 0)),
(TREE_OPERAND (expr, 1)
? build_non_dependent_expr (TREE_OPERAND (expr, 1))
: build_non_dependent_expr (TREE_OPERAND (expr, 0))),
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 1cec00f2b85..60a986e1c30 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -26647,16 +26647,12 @@ dwarf2out_late_global_decl (tree decl)
{
dw_die_ref die = lookup_decl_die (decl);
- /* We may have to generate early debug late for LTO in case debug
+ /* We may have to generate full debug late for LTO in case debug
was not enabled at compile-time or the target doesn't support
the LTO early debug scheme. */
if (! die && in_lto_p)
- {
- dwarf2out_decl (decl);
- die = lookup_decl_die (decl);
- }
-
- if (die)
+ dwarf2out_decl (decl);
+ else if (die)
{
/* We get called via the symtab code invoking late_global_decl
for symbols that are optimized out.
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 97b32bb7e25..2064cf1314b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,73 @@
+2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91715
+ * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
+ it's an error so re-act correctly.
+
+2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91649
+ check.c (gfc_check_findloc): Additional checking for valid arguments
+
+2019-10-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91801
+ * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
+ gfc_error as a user can easily hit the condition.
+
+2019-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/84487
+ * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
+ DECL_ARTIFICAL and do not set TREE_READONLY.
+
+2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/47054
+ * decl.c (variable_decl): Do not search parent namespace for symbol.
+
+2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91942
+ * io.c (match_vtag): Check for non-NULL result->symtree.
+ (match_out_tag): Check for invalid constant due to inquiry parameter.
+ (match_filepos): Instead of a syntax error, go to cleanup to get better
+ error messages.
+
+2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91785
+ * primary.c (gfc_match_varspec): Ensure an inquiry parameter has
+ it locus set.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91864
+ * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
+ read into.
+ * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
+ can be neither an allocate-object nor stat variable.
+ (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.ngu.org>
+
+ Backport of r276254+276265
+ PR fortran/91802
+ * decl.c (attr_decl1): Check if rank+corank > 15.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91714
+ * decl.c (gfc_match_decl_type_spec): Issue errors for a few
+ mangled types.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91641
+ * check.c (gfc_check_is_contiguous): null() cannot be an actual
+ argument to is_contiguous().
+
2019-09-21 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 265fb1fda53..4ef354f0a6e 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3363,26 +3363,27 @@ bool
gfc_check_findloc (gfc_actual_arglist *ap)
{
gfc_expr *a, *v, *m, *d, *k, *b;
+ bool a1, v1;
a = ap->expr;
if (!intrinsic_type_check (a, 0) || !array_check (a, 0))
return false;
v = ap->next->expr;
- if (!scalar_check (v,1))
+ if (!intrinsic_type_check (v, 1) || !scalar_check (v,1))
return false;
- /* Check if the type is compatible. */
+ /* Check if the type are both logical. */
+ a1 = a->ts.type == BT_LOGICAL;
+ v1 = v->ts.type == BT_LOGICAL;
+ if ((a1 && !v1) || (!a1 && v1))
+ goto incompat;
- if ((a->ts.type == BT_LOGICAL && v->ts.type != BT_LOGICAL)
- || (a->ts.type != BT_LOGICAL && v->ts.type == BT_LOGICAL))
- {
- gfc_error ("Argument %qs of %qs intrinsic at %L must be in type "
- "conformance to argument %qs at %L",
- gfc_current_intrinsic_arg[0]->name,
- gfc_current_intrinsic, &a->where,
- gfc_current_intrinsic_arg[1]->name, &v->where);
- }
+ /* Check if the type are both character. */
+ a1 = a->ts.type == BT_CHARACTER;
+ v1 = v->ts.type == BT_CHARACTER;
+ if ((a1 && !v1) || (!a1 && v1))
+ goto incompat;
d = ap->next->next->expr;
m = ap->next->next->next->expr;
@@ -3430,6 +3431,14 @@ gfc_check_findloc (gfc_actual_arglist *ap)
return false;
return true;
+
+incompat:
+ gfc_error ("Argument %qs of %qs intrinsic at %L must be in type "
+ "conformance to argument %qs at %L",
+ gfc_current_intrinsic_arg[0]->name,
+ gfc_current_intrinsic, &a->where,
+ gfc_current_intrinsic_arg[1]->name, &v->where);
+ return false;
}
@@ -6569,6 +6578,14 @@ gfc_check_ttynam_sub (gfc_expr *unit, gfc_expr *name)
bool
gfc_check_is_contiguous (gfc_expr *array)
{
+ if (array->expr_type == EXPR_NULL
+ && array->symtree->n.sym->attr.pointer == 1)
+ {
+ gfc_error ("Actual argument at %L of %qs intrinsic shall be an "
+ "associated pointer", &array->where, gfc_current_intrinsic);
+ return false;
+ }
+
if (!array_check (array, 0))
return false;
@@ -6576,7 +6593,6 @@ gfc_check_is_contiguous (gfc_expr *array)
}
-
bool
gfc_check_isatty (gfc_expr *unit)
{
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 3e10dba757e..7b87bb88a30 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -2649,7 +2649,7 @@ variable_decl (int elem)
then we want to set the type & bail out. */
if (flag_cray_pointer && !gfc_comp_struct (gfc_current_state ()))
{
- gfc_find_symbol (name, gfc_current_ns, 1, &sym);
+ gfc_find_symbol (name, gfc_current_ns, 0, &sym);
if (sym != NULL && sym->attr.cray_pointee)
{
m = MATCH_YES;
@@ -4417,6 +4417,7 @@ get_kind:
gfc_next_ascii_char ();
return MATCH_YES;
}
+ gfc_error ("Malformed type-spec at %C");
return MATCH_NO;
}
}
@@ -4430,7 +4431,10 @@ get_kind:
}
if (matched_type && gfc_match_char (')') != MATCH_YES)
- return MATCH_ERROR;
+ {
+ gfc_error ("Malformed type-spec at %C");
+ return MATCH_ERROR;
+ }
/* Defer association of the KIND expression of function results
until after USE and IMPORT statements. */
@@ -6165,13 +6169,17 @@ gfc_match_prefix (gfc_typespec *ts)
found_prefix = true;
}
- if (!seen_type && ts != NULL
- && gfc_match_decl_type_spec (ts, 0) == MATCH_YES
- && gfc_match_space () == MATCH_YES)
+ if (!seen_type && ts != NULL)
{
-
- seen_type = true;
- found_prefix = true;
+ match m;
+ m = gfc_match_decl_type_spec (ts, 0);
+ if (m == MATCH_ERROR)
+ goto error;
+ if (m == MATCH_YES && gfc_match_space () == MATCH_YES)
+ {
+ seen_type = true;
+ found_prefix = true;
+ }
}
if (gfc_match ("elemental% ") == MATCH_YES)
@@ -8440,6 +8448,14 @@ attr_decl1 (void)
goto cleanup;
}
+ /* Check F2018:C822. */
+ if (sym->attr.dimension && sym->attr.codimension
+ && sym->as && sym->as->rank + sym->as->corank > 15)
+ {
+ gfc_error ("rank + corank of %qs exceeds 15 at %C", sym->name);
+ return MATCH_ERROR;
+ }
+
if (sym->attr.cray_pointee && sym->as != NULL)
{
/* Fix the array spec. */
@@ -10181,6 +10197,20 @@ gfc_match_derived_decl (void)
return MATCH_ERROR;
}
+ /* In free source form, need to check for TYPE XXX as oppose to TYPEXXX.
+ But, we need to simply return for TYPE(. */
+ if (m == MATCH_NO && gfc_current_form == FORM_FREE)
+ {
+ char c = gfc_peek_ascii_char ();
+ if (c == '(')
+ return m;
+ if (!gfc_is_whitespace (c))
+ {
+ gfc_error ("Mangled derived type definition at %C");
+ return MATCH_NO;
+ }
+ }
+
m = gfc_match (" %n ", name);
if (m != MATCH_YES)
return m;
@@ -10188,7 +10218,7 @@ gfc_match_derived_decl (void)
/* Make sure that we don't identify TYPE IS (...) as a parameterized
derived type named 'is'.
TODO Expand the check, when 'name' = "is" by matching " (tname) "
- and checking if this is a(n intrinsic) typename. his picks up
+ and checking if this is a(n intrinsic) typename. This picks up
misplaced TYPE IS statements such as in select_type_1.f03. */
if (gfc_peek_ascii_char () == '(')
{
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 9bee9094e7f..b9a29a0f932 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -1441,24 +1441,29 @@ match_vtag (const io_tag *tag, gfc_expr **v)
return MATCH_ERROR;
}
- if (result->symtree->n.sym->attr.intent == INTENT_IN)
+ if (result->symtree)
{
- gfc_error ("Variable %s cannot be INTENT(IN) at %C", tag->name);
- gfc_free_expr (result);
- return MATCH_ERROR;
- }
+ bool impure;
- bool impure = gfc_impure_variable (result->symtree->n.sym);
- if (impure && gfc_pure (NULL))
- {
- gfc_error ("Variable %s cannot be assigned in PURE procedure at %C",
- tag->name);
- gfc_free_expr (result);
- return MATCH_ERROR;
- }
+ if (result->symtree->n.sym->attr.intent == INTENT_IN)
+ {
+ gfc_error ("Variable %s cannot be INTENT(IN) at %C", tag->name);
+ gfc_free_expr (result);
+ return MATCH_ERROR;
+ }
+
+ impure = gfc_impure_variable (result->symtree->n.sym);
+ if (impure && gfc_pure (NULL))
+ {
+ gfc_error ("Variable %s cannot be assigned in PURE procedure at %C",
+ tag->name);
+ gfc_free_expr (result);
+ return MATCH_ERROR;
+ }
- if (impure)
- gfc_unset_implicit_pure (NULL);
+ if (impure)
+ gfc_unset_implicit_pure (NULL);
+ }
*v = result;
return MATCH_YES;
@@ -1474,7 +1479,16 @@ match_out_tag (const io_tag *tag, gfc_expr **result)
m = match_vtag (tag, result);
if (m == MATCH_YES)
- gfc_check_do_variable ((*result)->symtree);
+ {
+ if ((*result)->symtree)
+ gfc_check_do_variable ((*result)->symtree);
+
+ if ((*result)->expr_type == EXPR_CONSTANT)
+ {
+ gfc_error ("Expecting a variable at %L", &(*result)->where);
+ return MATCH_ERROR;
+ }
+ }
return m;
}
@@ -2804,7 +2818,7 @@ match_filepos (gfc_statement st, gfc_exec_op op)
m = match_file_element (fp);
if (m == MATCH_ERROR)
- goto syntax;
+ goto cleanup;
if (m == MATCH_NO)
{
m = gfc_match_expr (&fp->unit);
@@ -3608,7 +3622,17 @@ match_io_element (io_kind k, gfc_code **cpp)
{
m = gfc_match_variable (&expr, 0);
if (m == MATCH_NO)
- gfc_error ("Expected variable in READ statement at %C");
+ {
+ gfc_error ("Expecting variable in READ statement at %C");
+ m = MATCH_ERROR;
+ }
+
+ if (m == MATCH_YES && expr->expr_type == EXPR_CONSTANT)
+ {
+ gfc_error ("Expecting variable or io-implied-do in READ statement "
+ "at %L", &expr->where);
+ m = MATCH_ERROR;
+ }
if (m == MATCH_YES
&& expr->expr_type == EXPR_VARIABLE
@@ -3618,7 +3642,6 @@ match_io_element (io_kind k, gfc_code **cpp)
&expr->where);
m = MATCH_ERROR;
}
-
}
else
{
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 2d91a2bbace..efc0c2d7bc3 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -4219,6 +4219,12 @@ gfc_match_allocate (void)
if (m == MATCH_ERROR)
goto cleanup;
+ if (tail->expr->expr_type == EXPR_CONSTANT)
+ {
+ gfc_error ("Unexpected constant at %C");
+ goto cleanup;
+ }
+
if (gfc_check_do_variable (tail->expr->symtree))
goto cleanup;
@@ -4351,6 +4357,12 @@ alloc_opt_list:
tmp = NULL;
saw_stat = true;
+ if (stat->expr_type == EXPR_CONSTANT)
+ {
+ gfc_error ("STAT tag at %L cannot be a constant", &stat->where);
+ goto cleanup;
+ }
+
if (gfc_check_do_variable (stat->symtree))
goto cleanup;
@@ -4627,6 +4639,12 @@ gfc_match_deallocate (void)
if (m == MATCH_NO)
goto syntax;
+ if (tail->expr->expr_type == EXPR_CONSTANT)
+ {
+ gfc_error ("Unexpected constant at %C");
+ goto cleanup;
+ }
+
if (gfc_check_do_variable (tail->expr->symtree))
goto cleanup;
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index a69f71acf7e..8408e9c3d0d 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2293,6 +2293,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
if (tmp && tmp->type == REF_INQUIRY)
{
+ if (!primary->where.lb || !primary->where.nextc)
+ primary->where = gfc_current_locus;
gfc_simplify_expr (primary, 0);
if (primary->expr_type == EXPR_CONSTANT)
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index f8c9a42cdc7..58b4652b010 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -6745,7 +6745,15 @@ gfc_simplify_reshape (gfc_expr *source, gfc_expr *shape_exp,
gfc_extract_int (e, &order[i]);
- gcc_assert (order[i] >= 1 && order[i] <= rank);
+ if (order[i] < 1 || order[i] > rank)
+ {
+ gfc_error ("Element with a value of %d in ORDER at %L must be "
+ "in the range [1, ..., %d] for the RESHAPE intrinsic "
+ "near %L", order[i], &order_exp->where, rank,
+ &shape_exp->where);
+ return &gfc_bad_expr;
+ }
+
order[i]--;
if (x[order[i]] != 0)
{
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 583425c516d..9e1f159a696 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -6110,17 +6110,20 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr)
tree atype = type;
while (TREE_CODE (TREE_TYPE (atype)) == ARRAY_TYPE)
atype = TREE_TYPE (atype);
- if (TREE_CODE (TREE_TYPE (atype)) == INTEGER_TYPE
- && tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (se.expr)))
- > tree_to_uhwi (TYPE_SIZE_UNIT (atype)))
+ gcc_checking_assert (TREE_CODE (TREE_TYPE (atype))
+ == INTEGER_TYPE);
+ gcc_checking_assert (TREE_TYPE (TREE_TYPE (se.expr))
+ == TREE_TYPE (atype));
+ if (tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (se.expr)))
+ > tree_to_uhwi (TYPE_SIZE_UNIT (atype)))
{
unsigned HOST_WIDE_INT size
= tree_to_uhwi (TYPE_SIZE_UNIT (atype));
const char *p = TREE_STRING_POINTER (se.expr);
se.expr = build_string (size, p);
- TREE_TYPE (se.expr) = atype;
}
+ TREE_TYPE (se.expr) = atype;
}
break;
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index f5149eed981..eb92259f880 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1892,9 +1892,13 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->attr.associate_var)
GFC_DECL_ASSOCIATE_VAR_P (decl) = 1;
+ /* We no longer mark __def_init as read-only so it does not take up
+ space in the read-only section and dan go into the BSS instead,
+ see PR 84487. Marking this as artificial means that OpenMP will
+ treat this as predetermined shared. */
if (sym->attr.vtab
|| (sym->name[0] == '_' && gfc_str_startswith (sym->name, "__def_init")))
- TREE_READONLY (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
return decl;
}
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 32b352328a9..d414632e602 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -5190,4 +5190,5 @@ ipa_cp_c_finalize (void)
max_count = profile_count::uninitialized ();
overall_size = 0;
max_new_size = 0;
+ ipcp_free_transformation_sum ();
}
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index d86c2f3db55..848180aa441 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3725,6 +3725,18 @@ ipcp_transformation_initialize (void)
ipcp_transformation_sum = ipcp_transformation_t::create_ggc (symtab);
}
+/* Release the IPA CP transformation summary. */
+
+void
+ipcp_free_transformation_sum (void)
+{
+ if (!ipcp_transformation_sum)
+ return;
+
+ ipcp_transformation_sum->release ();
+ ipcp_transformation_sum = NULL;
+}
+
/* Set the aggregate replacements of NODE to be AGGVALS. */
void
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 7257a6d04f1..5ab3d07a6de 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -558,6 +558,7 @@ struct GTY(()) ipcp_transformation
void ipa_set_node_agg_value_chain (struct cgraph_node *node,
struct ipa_agg_replacement_value *aggvals);
void ipcp_transformation_initialize (void);
+void ipcp_free_transformation_sum (void);
/* ipa_edge_args stores information related to a callsite and particularly its
arguments. It can be accessed by the IPA_EDGE_REF macro. */
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 81b9014af4f..bf3dc9c10ef 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,11 @@
+2019-10-11 Joseph Myers <joseph@codesourcery.com>
+
+ * fi.po: Update.
+
+2019-09-30 Joseph Myers <joseph@codesourcery.com>
+
+ * es.po: Update.
+
2019-08-31 Joseph Myers <joseph@codesourcery.com>
* es.po: Update.
diff --git a/gcc/po/es.po b/gcc/po/es.po
index 5d620167297..c6eed017b3f 100644
--- a/gcc/po/es.po
+++ b/gcc/po/es.po
@@ -43,7 +43,7 @@ msgstr ""
"Project-Id-Version: gcc 9.1.0\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2019-05-02 20:28+0000\n"
-"PO-Revision-Date: 2019-08-31 18:04+0200\n"
+"PO-Revision-Date: 2019-09-30 17:16+0200\n"
"Last-Translator: Antonio Ceballos Roa <aceballos@gmail.com>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
"Language: es\n"
@@ -6795,7 +6795,7 @@ msgstr "Advierte de conversiones de entero a puntero y viceversa incompatibles."
#: c-family/c.opt:677
msgid "Warn for suspicious integer expressions in boolean context."
-msgstr ""
+msgstr "Advierte de expresiones enteras sospechosas en contexto booleano."
#: c-family/c.opt:681
msgid "Warn when there is a cast to a pointer from an integer of a different size."
@@ -6859,7 +6859,7 @@ msgstr "Avisa sobre campos faltantes en los inicializadores de struct."
#: c-family/c.opt:745
msgid "Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for."
-msgstr ""
+msgstr "Advierte de expansiones de macros no seguras a sentencias múltiples utilizadas como cuerpo de una cláusula como if, while, switch o for."
#: c-family/c.opt:749
msgid "Warn on direct multiple inheritance."
@@ -6871,7 +6871,7 @@ msgstr "Advierta de la definición de espacios de nombres."
#: c-family/c.opt:757
msgid "Warn when fields in a struct with the packed attribute are misaligned."
-msgstr ""
+msgstr "Avisa cuando un struct con el atributo «packed» tiene campos desalineados."
#: c-family/c.opt:761
msgid "Warn about missing sized deallocation functions."
@@ -6879,7 +6879,7 @@ msgstr "Advierte de funciones de desasignación con tamaño ausentes."
#: c-family/c.opt:765
msgid "Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers."
-msgstr ""
+msgstr "Advierte de divisiones sospechosas de dos expresiones sizeof que no funcionan correctamente con punteros."
#: c-family/c.opt:769
msgid "Warn about suspicious length parameters to certain string functions if the argument uses sizeof."
@@ -6891,7 +6891,7 @@ msgstr "Avisa cuando se aplica sizeof a parámetros declarados como array."
#: c-family/c.opt:777
msgid "Warn about buffer overflow in string manipulation functions like memcpy and strcpy."
-msgstr ""
+msgstr "Advierte de desbordamiento de búfer en funciones que manipulan cadenas, como memcpy y strcpy."
#: c-family/c.opt:782
msgid "Under the control of Object Size type, warn about buffer overflow in string manipulation functions like memcpy and strcpy."
@@ -7059,7 +7059,7 @@ msgstr "Avisa sobre malos usos de pragmas."
#: c-family/c.opt:991
msgid "Warn if constructor or destructors with priorities from 0 to 100 are used."
-msgstr ""
+msgstr "Avisa si se usan constructores o destructores con prioridades entre 0 y 100."
#: c-family/c.opt:995
msgid "Warn if a property for an Objective-C object has no assign semantics specified."
@@ -7079,7 +7079,7 @@ msgstr "Avisa sobre declaraciones múltiples del mismo objeto."
#: c-family/c.opt:1015
msgid "Warn about redundant calls to std::move."
-msgstr ""
+msgstr "Advierte de llamadas redundantes a std::move."
#: c-family/c.opt:1019
msgid "Warn about uses of register storage specifier."
@@ -7283,11 +7283,11 @@ msgstr "-fada-spec-parent=unidad Vuelca specs de Ada como unidades hijas del pa
#: c-family/c.opt:1267
msgid "Support C++17 allocation of over-aligned types."
-msgstr ""
+msgstr "Admite alojamiento C++17 de tipos sobrealineados."
#: c-family/c.opt:1271
msgid "-faligned-new=<N> Use C++17 over-aligned type allocation for alignments greater than N."
-msgstr ""
+msgstr "-faligned-new=<N> Usa alojamiento de tipo sobrealineado de C++17 para alineamientos mayores que N."
#: c-family/c.opt:1278
msgid "Allow variadic functions without named parameter."
@@ -7312,7 +7312,7 @@ msgstr "Donde acorte, usar rutas canonicalizadas para cabeceras de sistemas."
#: c-family/c.opt:1305
msgid "Enable the char8_t fundamental type and use it as the type for UTF-8 string and character literals."
-msgstr ""
+msgstr "Habilita el tipo fundamental char8_t y lo usa como el tipo para los literales de cadenas UTF-8 y de caracteres."
#: c-family/c.opt:1393
msgid "Deprecated in GCC 8. This switch has no effect."
@@ -7356,7 +7356,7 @@ msgstr "Factoriza constructores y destructores complejos para favorecer el espac
#: c-family/c.opt:1441
msgid "Print hierarchical comparisons when template types are mismatched."
-msgstr ""
+msgstr "Imprime comparaciones jerárquicas cuando los tipos de plantilla no coinciden."
#: c-family/c.opt:1445
msgid "Preprocess directives only."
@@ -7368,7 +7368,7 @@ msgstr "Permite '$' como un identificador de carácter."
#: c-family/c.opt:1453
msgid "-fmacro-prefix-map=<old>=<new> Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE()."
-msgstr ""
+msgstr "-fmacro-prefix-map=<viejo>=<nuevo> Asocia un nombre de directorio a otro en __FILE__, __BASE_FILE__, y __builtin_FILE()."
#: c-family/c.opt:1457
msgid "Write all declarations as Ada code transitively."
@@ -7909,13 +7909,11 @@ msgstr "No considerada."
#: d/lang.opt:51
msgid "-Hd <dir>\tWrite D interface files to directory <dir>."
-msgstr ""
+msgstr "-Hd <dir>\tEscribe los ficheros de interfaz de D en el directorio <dir>."
#: d/lang.opt:55
-#, fuzzy
-#| msgid "-o <file>\tPlace output into <file>."
msgid "-Hf <file>\tWrite D interface to <file>."
-msgstr "-o <fichero>\tColoca la salida en el <fichero>."
+msgstr "-Hf <fichero>\tEscribe el interfaz de D en el <fichero>."
#: d/lang.opt:123
msgid "Warn about casts that will produce a null result."
@@ -7950,10 +7948,8 @@ msgid "Generate code for all template instantiations."
msgstr "Genera código para todas las instanciaciones de plantillas."
#: d/lang.opt:178
-#, fuzzy
-#| msgid "Generate code for GNU assembler (gas)."
msgid "Generate code for assert contracts."
-msgstr "Genera código para el ensamblador de GNU (gas)."
+msgstr "Genera código para contratos de assert."
#: d/lang.opt:186
msgid "-fbounds-check=[on|safeonly|off]\tTurn array bounds checks on, in @safe code only, or off."
@@ -8019,19 +8015,15 @@ msgstr "Genera código para el modo de usuario."
#: d/lang.opt:262
msgid "Process all modules specified on the command line, but only generate code for the module specified by the argument."
-msgstr ""
+msgstr "Procesa todos los módulos especificados en la línea de órdenes, pero solo genera código para el módulo especificado por el argumento."
#: d/lang.opt:266
-#, fuzzy
-#| msgid "Generate code for built-in atomic operations."
msgid "Generate code for postcondition contracts."
-msgstr "Genera código para operaciones atómicas internas."
+msgstr "Genera código para contratos de postcondiciones."
#: d/lang.opt:270
-#, fuzzy
-#| msgid "Generate code for built-in atomic operations."
msgid "Generate code for precondition contracts."
-msgstr "Genera código para operaciones atómicas internas."
+msgstr "Genera código para contratos de precondiciones."
#: d/lang.opt:274
#, fuzzy
@@ -8040,14 +8032,12 @@ msgid "Compile release version."
msgstr "Muestra la versión del compilador."
#: d/lang.opt:282
-#, fuzzy
-#| msgid "Generate code for the supervisor mode (default)."
msgid "Generate code for switches without a default case."
-msgstr "Genera código para el modo supervisor (predeterminado)."
+msgstr "Genera código para las opciones sin caso predefinido."
#: d/lang.opt:286
msgid "List information on all language changes."
-msgstr ""
+msgstr "Muestra información sobre todos los cambios del lenguaje."
#: d/lang.opt:290
msgid "Give deprecation messages about -ftransition=import anomalies."
@@ -8055,7 +8045,7 @@ msgstr ""
#: d/lang.opt:294
msgid "List all usages of complex or imaginary types."
-msgstr ""
+msgstr "Enumera todos los usos de los tipos complejo o imaginario."
#: d/lang.opt:298
msgid "Implement DIP1000: Scoped pointers (experimental)."
@@ -8067,21 +8057,19 @@ msgstr ""
#: d/lang.opt:306
msgid "List all non-mutable fields which occupy an object instance."
-msgstr ""
+msgstr "Enumera todos los campos no mutables que ocupan la instancia de un objeto."
#: d/lang.opt:310
msgid "Revert to single phase name lookup."
-msgstr ""
+msgstr "Revierta a búsqueda de nombres de una sola fase."
#: d/lang.opt:314
msgid "List all hidden GC allocations."
msgstr ""
#: d/lang.opt:318
-#, fuzzy
-#| msgid "Use given thread-local storage dialect."
msgid "List all variables going into thread local storage."
-msgstr "Usa el dialecto de almacenamiento thread-local dado."
+msgstr "Enumera todas las variables que van al almacenamiento local del hilo."
#: d/lang.opt:322
#, fuzzy
@@ -8094,18 +8082,16 @@ msgid "-fversion=<level|ident>\tCompile in version code >= <level> or identified
msgstr ""
#: d/lang.opt:350
-#, fuzzy
-#| msgid "Do not assume that standard C libraries and \"main\" exist."
msgid "Do not link the standard D library in the compilation."
-msgstr "No asume que existen las bibliotecas C estándar y \"main\"."
+msgstr "No enlaza la biblioteca D estándar en la compilación."
#: d/lang.opt:358
msgid "Link the standard D library statically in the compilation."
-msgstr ""
+msgstr "Enlaza la biblioteca D estándar estáticamente en la compilación."
#: d/lang.opt:362
msgid "Link the standard D library dynamically in the compilation."
-msgstr ""
+msgstr "Enlaza la biblioteca D estándar dinámicamente en la compilación."
#: go/lang.opt:42
msgid "-fgo-c-header=<file>\tWrite Go struct definitions to file as C code."
@@ -8172,16 +8158,12 @@ msgid "-mpointer-size=[no,32,short,64,long]\tSet the default pointer size."
msgstr "-mpointer-size=[no,32,short,64,long]\tEstablece el tamaña predeterminado de los punteros."
#: config/mcore/mcore.opt:23
-#, fuzzy
-#| msgid "Generate code for the M*Core M210"
msgid "Generate code for the M*Core M210."
-msgstr "Genera código para el M*Core M210"
+msgstr "Genera código para el M*Core M210."
#: config/mcore/mcore.opt:27
-#, fuzzy
-#| msgid "Generate code for the M*Core M340"
msgid "Generate code for the M*Core M340."
-msgstr "Genera código para el M*Core M340"
+msgstr "Genera código para el M*Core M340."
#: config/mcore/mcore.opt:31
msgid "Force functions to be aligned to a 4 byte boundary."
@@ -8551,7 +8533,7 @@ msgstr "Activa la biblioteca compartida basada en ID."
#: config/m68k/m68k.opt:147
msgid "Use 32-bit offsets in jump tables rather than 16-bit offsets."
-msgstr ""
+msgstr "Usa desplazamientos de 32 bits en las tablas de saltos en lugar de desplazamientos de 16 bits."
#: config/m68k/m68k.opt:151
msgid "Do not use the bit-field instructions."
@@ -8662,11 +8644,11 @@ msgstr "Utiliza operadores %reloc() en vez de macros de ensamblador para cargar
#: config/riscv/riscv.opt:114
msgid "Take advantage of linker relaxations to reduce the number of instructions required to materialize symbol addresses."
-msgstr ""
+msgstr "Aprovecha los descansos del enlazador para reducir el número de instrucciones requeridas para materializar direcciones de símbolos."
#: config/riscv/riscv.opt:133
msgid "Emit RISC-V ELF attribute."
-msgstr ""
+msgstr "Emite el atributo ELF de RISC-V."
#: config/m32c/m32c.opt:23
msgid "-msim\tUse simulator runtime."
diff --git a/gcc/po/fi.po b/gcc/po/fi.po
index c66de8afab4..b4b27c40017 100644
--- a/gcc/po/fi.po
+++ b/gcc/po/fi.po
@@ -33,7 +33,7 @@ msgstr ""
"Project-Id-Version: gcc 9.1.0\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2019-05-02 20:28+0000\n"
-"PO-Revision-Date: 2019-05-29 18:58+0300\n"
+"PO-Revision-Date: 2019-10-11 20:03+0300\n"
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
"Language: fi\n"
@@ -67,9 +67,9 @@ msgid "[cannot find %s]"
msgstr "lähdetiedostoa %s ei löydy"
#: collect2.c:1632
-#, fuzzy, c-format
+#, c-format
msgid "collect2 version %s\n"
-msgstr "gcc-versio %s %s\n"
+msgstr "collect2-versio %s\n"
#: collect2.c:1737
#, c-format
@@ -118,9 +118,9 @@ msgid "const/copy propagation disabled"
msgstr "const-/kopioinnin-eteneminen poistettu käytöstä"
#: diagnostic.c:145
-#, fuzzy, c-format
+#, c-format
msgid "%s: all warnings being treated as errors"
-msgstr "Käsittele kaikki varoitukset virheinä"
+msgstr "%s: kaikki varoitukset käsitellään virheinä"
#: diagnostic.c:150
#, c-format
@@ -6142,9 +6142,8 @@ msgid "gfortran does not support -E without -cpp"
msgstr "gfortran ei tue valitsinta -E ilman valitsinta -cpp"
#: objc/lang-specs.h:30 objc/lang-specs.h:41
-#, fuzzy
msgid "GNU Objective C no longer supports traditional compilation"
-msgstr "GCC ei enää tue valitsinta -traditional ilman valitsinta -E"
+msgstr "GNU Objective C ei enää tue perinteistä kääntämistä"
#: objc/lang-specs.h:55
msgid "objc-cpp-output is deprecated; please use objective-c-cpp-output instead"
@@ -6688,9 +6687,8 @@ msgid "Conform to the ISO Fortran 95 standard."
msgstr "Noudata ISO Fortran 95 -standardia"
#: fortran/lang.opt:827
-#, fuzzy
msgid "Conform to nothing in particular."
-msgstr "Älä noudata mitään erityisesti"
+msgstr "Älä noudata mitään erityisesti."
#: fortran/lang.opt:831
msgid "Accept extensions to support legacy code."
@@ -6732,24 +6730,20 @@ msgid "-I <dir>\tAdd <dir> to the end of the main include path."
msgstr "-isystem <hakemisto>\tLisää <hakemisto> järjestelmän include-polun alkuun"
#: c-family/c.opt:217
-#, fuzzy
msgid "Generate make dependencies."
-msgstr "Luo make-riippuvuudet"
+msgstr "Luo make-riippuvuudet."
#: c-family/c.opt:221
-#, fuzzy
msgid "Generate make dependencies and compile."
-msgstr "Luo make-riippuvuudet ja käännä"
+msgstr "Luo make-riippuvuudet ja käännä."
#: c-family/c.opt:225
-#, fuzzy
msgid "-MF <file>\tWrite dependency output to the given file."
-msgstr "Kirjoita riippuvuustuloste annettuun tiedostoon"
+msgstr "-MF <tiedosto>\tKirjoita riippuvuustuloste annettuun tiedostoon."
#: c-family/c.opt:229
-#, fuzzy
msgid "Treat missing header files as generated files."
-msgstr "Käsittele puuttuvia otsikkotiedostoja luotavina tiedostoina"
+msgstr "Käsittele puuttuvia otsikkotiedostoja luotavina tiedostoina."
#: c-family/c.opt:233
msgid "Like -M but ignore system header files."
@@ -6773,9 +6767,8 @@ msgid "-MT <target>\tAdd an unquoted target."
msgstr ""
#: c-family/c.opt:253
-#, fuzzy
msgid "Do not generate #line directives."
-msgstr "Älä luo #line-direktiivejä"
+msgstr "Älä luo #line-direktiivejä."
#: c-family/c.opt:257
#, fuzzy
@@ -6817,11 +6810,9 @@ msgstr ""
msgid "Enable most warning messages."
msgstr "Subject: Fetchmailin varoitus liian suuresta viestistä"
-# vähän fuzzy
#: c-family/c.opt:308
-#, fuzzy
msgid "Warn on any use of alloca."
-msgstr "Varoita pragmain väärästä käytöstä."
+msgstr "Varoita kaikesta allocan käytöstä."
#: c-family/c.opt:312
#, fuzzy
@@ -6931,9 +6922,8 @@ msgstr "Varoita ”char”-tyypillä indeksoinnista."
#: c-family/c.opt:1369 c-family/c.opt:1373 c-family/c.opt:1377
#: c-family/c.opt:1381 c-family/c.opt:1385 c-family/c.opt:1389
#: config/i386/i386.opt:967
-#, fuzzy
msgid "Deprecated in GCC 9. This switch has no effect."
-msgstr "Vanhentunut. Tämä valitsin ei vaikuta mihinkään."
+msgstr "Vanhentunut GCC 9:ssä. Tämä valitsin ei vaikuta mihinkään."
#: c-family/c.opt:429
msgid "Warn about variables that might be changed by \"longjmp\" or \"vfork\"."
@@ -6964,9 +6954,8 @@ msgid "Warn when all constructors and destructors are private."
msgstr "Varoita kun kaikki muodostimet ja hajottimet ovat yksityisiä."
#: c-family/c.opt:461
-#, fuzzy
msgid "Warn about dangling else."
-msgstr "Varoita implisiittisistä funktioesittelyistä."
+msgstr "Varoita orvosta elsestä."
#: c-family/c.opt:465
msgid "Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage."
@@ -7119,9 +7108,8 @@ msgid "Warn whenever type qualifiers are ignored."
msgstr "Varoita tyyppimääreiden huomiotta jättämisestä."
#: c-family/c.opt:622
-#, fuzzy
msgid "Warn whenever attributes are ignored."
-msgstr "Varoita tyyppimääreiden huomiotta jättämisestä."
+msgstr "Varoita attribuuttien huomiotta jättämisestä."
#: c-family/c.opt:626
#, fuzzy
@@ -7196,9 +7184,8 @@ msgid "Warn when a string or character literal is followed by a ud-suffix which
msgstr ""
#: c-family/c.opt:701
-#, fuzzy
msgid "Warn when a logical operator is suspiciously always evaluating to true or false."
-msgstr "Varoita vertailusta, joka on aina tosi tai aina epätosi."
+msgstr "Varoita, kun looginen operaattori on aina tosi tai aina epätosi."
#: c-family/c.opt:705
msgid "Warn when logical not is used on the left hand side operand of a comparison."
@@ -7429,9 +7416,8 @@ msgid "Warn about packed bit-fields whose offset changed in GCC 4.4."
msgstr "Varoita pakatuista bittikentistä, joiden siirrososoite vaihtui GCC 4.4:ssä"
#: c-family/c.opt:955
-#, fuzzy
msgid "Warn about possibly missing parentheses."
-msgstr "Varoita mahdollisesti puuttuvista sulkeista"
+msgstr "Varoita mahdollisesti puuttuvista sulkeista."
#: c-family/c.opt:963
msgid "Warn about calling std::move on a local object in a return statement preventing copy elision."
@@ -7975,9 +7961,8 @@ msgid "Enable OpenMP's SIMD directives."
msgstr "Luokittelematon lause IF-lauseessa kohdassa %C"
#: c-family/c.opt:1681
-#, fuzzy
msgid "Recognize C++ keywords like \"compl\" and \"xor\"."
-msgstr "Tunnista C++:n avainsanat kuten ”compl” ja ”xor”"
+msgstr "Tunnista C++:n avainsanat kuten ”compl” ja ”xor”."
#: c-family/c.opt:1692
msgid "Look for and use PCH files even when preprocessing."
@@ -8732,9 +8717,8 @@ msgid "Set the maximum amount for a single stack increment operation."
msgstr ""
#: config/mcore/mcore.opt:75
-#, fuzzy
msgid "Always treat bitfields as int-sized."
-msgstr "Käsittele bittikenttiä aina int-kokoisina"
+msgstr "Käsittele bittikenttiä aina int-kokoisina."
#: config/linux-android.opt:23
msgid "Generate code for the Android platform."
@@ -19730,7 +19714,7 @@ msgstr "%qs-attribuuttia ei huomioida %qs:lle"
#: cgraphunit.c:976 c/c-decl.c:11507
#, fuzzy, gcc-internal-format
msgid "%q+F used but never defined"
-msgstr "nimike %q+D määritelty mutta käytettämättä"
+msgstr "nimike %q+D määritelty mutta käyttämättä"
#: cgraphunit.c:978 c/c-decl.c:11517
#, fuzzy, gcc-internal-format
@@ -29294,7 +29278,7 @@ msgstr "%<X<=Y<=Z%> -tyylisillä vertailuilla on eri merkitys kuin matematiikass
#: c-family/c-warn.c:2021
#, gcc-internal-format
msgid "label %q+D defined but not used"
-msgstr "nimike %q+D määritelty mutta käytettämättä"
+msgstr "nimike %q+D määritelty mutta käyttämättä"
#: c-family/c-warn.c:2023
#, gcc-internal-format
@@ -68642,7 +68626,7 @@ msgstr "(%qs:n alustuksen lähistöllä)"
#, fuzzy
#~ msgid "variable %q+D set but not used"
-#~ msgstr "nimike %q+D määritelty mutta käytettämättä"
+#~ msgstr "nimike %q+D määritelty mutta käyttämättä"
#~ msgid "jump to label %q+D"
#~ msgstr "hyppy nimiöön %q+D"
@@ -68659,7 +68643,7 @@ msgstr "(%qs:n alustuksen lähistöllä)"
#, fuzzy
#~ msgid "parameter %q+D set but not used"
-#~ msgstr "nimike %q+D määritelty mutta käytettämättä"
+#~ msgstr "nimike %q+D määritelty mutta käyttämättä"
#~ msgid "%q+D declared here"
#~ msgstr "%q+D esitelty täällä"
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 71b6ec52fcd..ab2f9044bfe 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,121 @@
+2019-10-16 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-10-02 Richard Biener <rguenther@suse.de>
+
+ PR c++/91606
+ * g++.dg/torture/pr91606.C: New testcase.
+
+ 2019-09-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91812
+ * gcc.dg/torture/pr91812.c: New testcase.
+
+2019-10-14 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ Backport from trunk.
+ 2019-09-26 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/pure-builtin-redundant-load.c: New.
+
+2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91715
+ * gfortran.dg/function_kinds_5.f90: Prune run-on error.
+ * gfortran.dg/pr85543.f90: Ditto.
+ * gfortran.dg/pr91715.f90: New test.
+
+2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91649
+ * gfortran.dg/pr91649.f90: New test.
+
+2019-10-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91801
+ * gfortran.dg/pr91801.f90: New test.
+
+2019-10-10 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/92022
+ * g++.dg/pr92022.C: New test.
+
+2019-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/84487
+ * gfortran.dg/typebound_call_22.f03: xfail.
+
+2019-10-07 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ Backport from mainline
+ 2019-10-01 Bill Schmidt <wschmdit@linux.ibm.com>
+
+ PR target/91275
+ * gcc.target/powerpc/pr91275.c: New.
+
+2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/47054
+ * gfortran.dg/pr47054_1.f90: New test
+ * gfortran.dg/pr47054_2.f90: Ditto.
+
+2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91942
+ * gfortran.dg/pr91587.f90: Update dg-error regex.
+ * gfortran.dg/pr91942.f90: New test.
+
+2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91785
+ * gfortran.dg/pr91785.f90: New test.
+
+2019-10-04 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
+
+ Backport from mainline
+ 2019-10-03 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
+
+ PR target/91769
+ * gcc.target/mips/pr91769.c: New test.
+
+2019-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backport from mainline
+
+ 2019-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR fortran/91716
+ * gfortran.dg/pr91716.f90: New test.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91864
+ * gcc/testsuite/gfortran.dg/pr91864.f90
+
+2019-10-01 Steven G. Kargl <kargl@gcc.ngu.org>
+
+ PR fortran/91802
+ * gfortran.dg/pr91802.f90: New test.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91714
+ * gfortran.dg/dec_type_print_3.f90: Update dg-error regex.
+ * gfortran.dg/pr91714.f90: New test.
+
+2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91641
+ * gfortran.dg/pr91641.f90: New test.
+
+2019-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2019-09-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/nosplit-di-const-volatile_1.c: New test.
+
2019-09-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Backport from mainline
diff --git a/gcc/testsuite/g++.dg/cpp0x/nontype5.C b/gcc/testsuite/g++.dg/cpp0x/nontype5.C
new file mode 100644
index 00000000000..c31134581aa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nontype5.C
@@ -0,0 +1,17 @@
+// PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17.
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+constexpr bool is_integral_(...) {
+ return false;
+}
+template<typename T, T = 1>
+constexpr bool is_integral_(long) {
+ return true;
+}
+
+static_assert(is_integral_<int>(42), "");
+static_assert(!is_integral_<void>(42), "");
+
+struct S {};
+static_assert(!is_integral_<S>(42), "");
diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ63.C b/gcc/testsuite/g++.dg/cpp1y/var-templ63.C
new file mode 100644
index 00000000000..a65f53b2963
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/var-templ63.C
@@ -0,0 +1,5 @@
+// PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.
+// { dg-do compile { target c++14 } }
+
+constexpr bool f(const char*) { return true; }
+template<typename T> const char c = "FOO"[f("BAR") ? 1 : 0];
diff --git a/gcc/testsuite/g++.dg/pr92022.C b/gcc/testsuite/g++.dg/pr92022.C
new file mode 100644
index 00000000000..066d984ffc5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr92022.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target alpha*-*-* } }
+// { dg-options "-O1 -g -fno-var-tracking -mcpu=ev4 -mieee" }
+
+struct a {
+ a(long);
+};
+long b;
+void c() {
+ a d(1);
+ double e = b;
+ for (; b;)
+ d = e;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr91606.C b/gcc/testsuite/g++.dg/torture/pr91606.C
new file mode 100644
index 00000000000..37a05a5e3a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr91606.C
@@ -0,0 +1,109 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-aliasing" } */
+
+#include <cstdlib>
+#include <array>
+#include <type_traits>
+
+template <typename T1, typename T2>
+struct variant
+{
+ constexpr variant(T1 arg)
+ : f1(arg),
+ index(0)
+ {}
+
+ constexpr variant(T2 arg)
+ : f2(arg),
+ index(1)
+ {}
+
+ union
+ {
+ T1 f1;
+ T2 f2;
+ };
+ std::size_t index = 0;
+};
+
+template <typename T1, typename T2>
+constexpr const T1* get_if(const variant<T1, T2>* v)
+{
+ if (v->index != 0)
+ {
+ return nullptr;
+ }
+ return &v->f1;
+}
+
+template <typename T2, typename T1>
+constexpr const T2* get_if(const variant<T1, T2>* v)
+{
+ if (v->index != 1)
+ {
+ return nullptr;
+ }
+ return &v->f2;
+}
+
+template <typename T, size_t N>
+struct my_array
+{
+ constexpr const T* begin() const
+ {
+ return data;
+ }
+
+ constexpr const T* end() const
+ {
+ return data + N;
+ }
+
+ T data[N];
+};
+
+template <typename ...Ts>
+constexpr auto get_array_of_variants(Ts ...ptrs)
+{
+ return std::array<variant<std::decay_t<Ts>...>, sizeof...(Ts)>{ ptrs... };
+}
+
+template <typename T>
+constexpr auto get_member_functions();
+
+template <typename Member, typename Class>
+constexpr int getFuncId(Member (Class::*memFuncPtr))
+{
+ int idx = 0u;
+ for (auto &anyFunc : get_member_functions<Class>())
+ {
+ if (auto *specificFunc = get_if<Member (Class::*)>(&anyFunc))
+ {
+ if (*specificFunc == memFuncPtr)
+ {
+ return idx;
+ }
+ }
+ ++idx;
+ }
+ std::abort();
+}
+
+struct MyStruct
+{
+ void fun1(int /*a*/) {}
+
+ int fun2(char /*b*/, short /*c*/, bool /*d*/) { return 0; }
+
+};
+
+template <>
+constexpr auto get_member_functions<MyStruct>()
+{
+ return get_array_of_variants(&MyStruct::fun1, &MyStruct::fun2);
+}
+
+int main()
+{
+ return getFuncId(&MyStruct::fun1);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr91812.c b/gcc/testsuite/gcc.dg/torture/pr91812.c
new file mode 100644
index 00000000000..ebc67a01e33
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr91812.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-options "-fdump-tree-optimized-blocks" } */
+
+unsigned register1;
+unsigned register2;
+
+void busy_wait_for_register (int x)
+{
+ volatile unsigned* ptr;
+ switch(x) {
+ case 0x1111:
+ ptr = &register1;
+ break;
+
+ case 0x2222:
+ ptr = &register2;
+ break;
+
+ default:
+ return;
+ }
+ while (*ptr) {}
+}
+
+/* { dg-final { scan-tree-dump "loop depth 1" "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/nosplit-di-const-volatile_1.c b/gcc/testsuite/gcc.target/aarch64/nosplit-di-const-volatile_1.c
new file mode 100644
index 00000000000..da5975ad165
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/nosplit-di-const-volatile_1.c
@@ -0,0 +1,15 @@
+/* Check that storing the 64-bit immediate to a volatile location is done
+ with a single store. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef unsigned long long u64;
+
+void bar (u64 *x)
+{
+ *(volatile u64 *)x = 0xabcdef10abcdef10ULL;
+}
+
+/* { dg-final { scan-assembler-times "str\tx..?, .*" 1 } } */
+/* { dg-final { scan-assembler-not "str\tw..?, .*" } } */
diff --git a/gcc/testsuite/gcc.target/mips/pr91769.c b/gcc/testsuite/gcc.target/mips/pr91769.c
new file mode 100644
index 00000000000..c9ad70d7f75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr91769.c
@@ -0,0 +1,19 @@
+/* PR target/91769 */
+/* { dg-do compile } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" "-g" } { "" } } */
+/* { dg-options "-EL -mgp32 -mhard-float" } */
+
+NOCOMPRESSION double
+foo (void)
+{
+ register double* pf __asm__ ("$a1");
+ __asm__ __volatile__ ("":"=r"(pf));
+ double f = *pf;
+
+ if (f != f)
+ f = -f;
+ return f;
+}
+
+/* { dg-final { scan-assembler-not "lw\t\\\$4,0\\(\\\$5\\)\n\tlw\t\\\$5,4\\(\\\$5\\)\n\tldc1\t\\\$.*,0\\(\\\$5\\)" } } */
+/* { dg-final { scan-assembler "lw\t\\\$4,0\\(\\\$5\\)\n\tlw\t\\\$5,4\\(\\\$5\\)\n\tmtc1\t\\\$4,\\\$.*\n\tmthc1\t\\\$5,\\\$.*" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr91275.c b/gcc/testsuite/gcc.target/powerpc/pr91275.c
new file mode 100644
index 00000000000..b23d75be29b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr91275.c
@@ -0,0 +1,21 @@
+/* Test that we generate vpmsumd correctly without a swap error. */
+
+/* { dg-do run { target { p8vector_hw } } } */
+/* { dg-options "-O2 -std=gnu11" } */
+
+#include <altivec.h>
+
+int main() {
+
+ const unsigned long long r0l = 0x8e7dfceac070e3a0;
+ vector unsigned long long r0 = (vector unsigned long long) {r0l, 0}, v;
+ const vector unsigned long long pd
+ = (vector unsigned long) {0xc2LLU << 56, 0};
+
+ v = __builtin_crypto_vpmsumd ((vector unsigned long long) {r0[0], 0}, pd);
+
+ if (v[0] != 0x4000000000000000 || v[1] != 0x65bd7ab605a4a8ff)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c b/gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c
new file mode 100644
index 00000000000..16ab6abfc3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -fdump-tree-fre-all -mvsx" } */
+
+/* Verify we remove a redundant load that occurs both before and after
+we call a vector load builtin.
+This testcase is introduced as we updated a number of our vector load
+built-ins with the attribute of PURE instead of MEM, to indicate that
+those builtins only read from memory, versus reading from and writing
+to the same.
+This means we can identify the redundant load instructions in an earlier
+pass, and optimize them away. */
+
+#include <altivec.h>
+
+vector signed short load_data;
+
+vector signed short foo()
+{
+ vector signed short r11,r12,r13;
+ r11 = load_data;
+ r12 = vec_xl (0, &load_data[0]);
+ r13 = load_data;
+ return (r11 + r12 + r13);
+}
+
+vector signed short biz()
+{
+ vector signed short r21,r22,r23;
+ r21 = load_data;
+ r22 = vec_lvehx (0, &load_data[0]);
+ r23 = load_data;
+ return (r21 + r22 + r23);
+}
+
+vector signed short bar()
+{
+ vector signed short r31,r32,r33;
+ r31 = load_data;
+ r32 = vec_lvx (0, &load_data[0]);
+ r33 = load_data;
+ return (r31 + r32 + r33);
+}
+
+/* { dg-final { scan-tree-dump-times "Removing dead stmt r13_. = load_data;" 1 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Removing dead stmt r23_. = load_data;" 1 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Removing dead stmt r33_. = load_data;" 1 "fre1" } } */
diff --git a/gcc/testsuite/gfortran.dg/dec_type_print_3.f90 b/gcc/testsuite/gfortran.dg/dec_type_print_3.f90
index e5b455eea26..6836c257e14 100644
--- a/gcc/testsuite/gfortran.dg/dec_type_print_3.f90
+++ b/gcc/testsuite/gfortran.dg/dec_type_print_3.f90
@@ -8,9 +8,9 @@
include 'dec_type_print.f90'
-! { dg-error "Invalid character in name" "" { target *-*-* } 52 }
+! { dg-error "Mangled derived type definition" "" { target *-*-* } 52 }
! { dg-error "Invalid character in name" "" { target *-*-* } 53 }
-! { dg-error "Invalid character in name" "" { target *-*-* } 54 }
+! { dg-error "Mangled derived type definition" "" { target *-*-* } 54 }
! { dg-error "Invalid character in name" "" { target *-*-* } 55 }
! { dg-error "Invalid character in name" "" { target *-*-* } 56 }
! { dg-error "Invalid character in name" "" { target *-*-* } 57 }
diff --git a/gcc/testsuite/gfortran.dg/function_kinds_5.f90 b/gcc/testsuite/gfortran.dg/function_kinds_5.f90
index e48484ec30d..106431fe206 100644
--- a/gcc/testsuite/gfortran.dg/function_kinds_5.f90
+++ b/gcc/testsuite/gfortran.dg/function_kinds_5.f90
@@ -8,3 +8,4 @@
real (bad_kind(0d0)) function foo () ! { dg-error "must be an intrinsic function" }
foo = real (kind (foo))
end function
+! { dg-prune-output "Bad kind expression for function" }
diff --git a/gcc/testsuite/gfortran.dg/pr47054_1.f90 b/gcc/testsuite/gfortran.dg/pr47054_1.f90
new file mode 100644
index 00000000000..3665edbd72b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr47054_1.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fcray-pointer" }
+! PR fortran/47054
+subroutine host_sub
+ implicit none
+ real xg
+ pointer (paxg, xg)
+ call internal_sub
+ contains
+ subroutine internal_sub
+ implicit none
+ real xg
+ pointer (paxg, xg)
+ end subroutine internal_sub
+end subroutine host_sub
diff --git a/gcc/testsuite/gfortran.dg/pr47054_2.f90 b/gcc/testsuite/gfortran.dg/pr47054_2.f90
new file mode 100644
index 00000000000..3b7c4aaf815
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr47054_2.f90
@@ -0,0 +1,41 @@
+! { dg-do compile }
+! { dg-options "-fcray-pointer" }
+! PR fortran/47054
+! Code contributed by Deji Akingunola <deji_aking at yahoo dot ca>
+subroutine host_sub(F_su,F_nk)
+ implicit none
+
+ integer :: F_nk
+ real,dimension(F_nk) :: F_su
+ integer G_ni, G_nj
+ real*8 G_xg_8, G_yg_8
+ pointer (paxg_8, G_xg_8(G_ni))
+ pointer (payg_8, G_yg_8(G_nj))
+ common / G_p / paxg_8,payg_8
+ common / G / G_ni, G_nj
+
+ call internal_sub(F_su,F_nk)
+ return
+contains
+
+ subroutine internal_sub(F_su,F_nk)
+ implicit none
+ integer G_ni, G_nj
+ real*8 G_xg_8, G_yg_8
+ pointer (paxg_8, G_xg_8(G_ni))
+ pointer (payg_8, G_yg_8(G_nj))
+ common / G_p / paxg_8,payg_8
+ common / G / G_ni, G_nj
+
+ integer :: F_nk
+ real,dimension(F_nk) :: F_su
+ integer k,k2
+
+ k2 = 0
+ do k = 1, F_nk, 2
+ k2 = k2+1
+ F_su(k) = F_su(k) + 1.0
+ enddo
+ return
+ end subroutine internal_sub
+end subroutine host_sub
diff --git a/gcc/testsuite/gfortran.dg/pr85543.f90 b/gcc/testsuite/gfortran.dg/pr85543.f90
index d3f83276a7f..b0faa8d5927 100644
--- a/gcc/testsuite/gfortran.dg/pr85543.f90
+++ b/gcc/testsuite/gfortran.dg/pr85543.f90
@@ -6,3 +6,4 @@ contains
real(z()) function f() ! { dg-error "in initialization expression at" }
end
end
+! { dg-prune-output "Bad kind expression for function" }
diff --git a/gcc/testsuite/gfortran.dg/pr91587.f90 b/gcc/testsuite/gfortran.dg/pr91587.f90
index c07735df65e..c304be116c0 100644
--- a/gcc/testsuite/gfortran.dg/pr91587.f90
+++ b/gcc/testsuite/gfortran.dg/pr91587.f90
@@ -2,9 +2,9 @@
! PR fortran/91587
! Code contributed by Gerhard Steinmetz
program p
- backspace(err=!) ! { dg-error "Syntax error in" }
- flush(err=!) ! { dg-error "Syntax error in" }
- rewind(err=!) ! { dg-error "Syntax error in" }
+ backspace(err=!) ! { dg-error "Invalid value for" }
+ flush(err=!) ! { dg-error "Invalid value for" }
+ rewind(err=!) ! { dg-error "Invalid value for" }
end
subroutine bar ! An other matcher runs, and gives a different error.
diff --git a/gcc/testsuite/gfortran.dg/pr91641.f90 b/gcc/testsuite/gfortran.dg/pr91641.f90
new file mode 100644
index 00000000000..1970824a946
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91641.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/91641
+! Code conyributed by Gerhard Steinmetz
+program p
+ real, pointer :: z(:)
+ print *, is_contiguous (null(z)) ! { dg-error "shall be an associated" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91649.f90 b/gcc/testsuite/gfortran.dg/pr91649.f90
new file mode 100644
index 00000000000..0e6acb9ac8d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91649.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! PR fortran/91649
+! Code originally contributed by Gerhard Steinmetz
+subroutine p
+ logical :: back = .true.
+ integer :: x(1) = findloc([1, 2, 1], '1', back=back) ! { dg-error "must be in type conformance" }
+ print *, x
+end
+
+subroutine q
+ type t
+ end type
+ logical :: back = .false.
+ integer :: x(1) = findloc([1, 2, 1], t(), back=back) ! { dg-error "must be of intrinsic type" }
+ print *, x
+end
+
+subroutine s
+ character(4) :: c = '1234'
+ integer :: x(1) = findloc([1, 2, 1], c, back=.true.) ! { dg-error "must be in type conformance" }
+ print *, x
+end
+
diff --git a/gcc/testsuite/gfortran.dg/pr91714.f90 b/gcc/testsuite/gfortran.dg/pr91714.f90
new file mode 100644
index 00000000000..8b855d90318
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91714.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! Contributed by Gerhard Steinmetz
+program p
+ typea ! { dg-error "Mangled derived type" }
+ integer b
+ end type ! { dg-error "Expecting END PROGRAM" }
+ type(a) :: c ! { dg-error "is being used before it" }
+ c = a(1)
+ print *, c
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91715.f90 b/gcc/testsuite/gfortran.dg/pr91715.f90
new file mode 100644
index 00000000000..a3d9b8d1d9a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91715.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! PR fortran/91715
+! Code contributed Gerhard Steinmetz
+character(1function f() ! { dg-error "Syntax error in CHARACTER" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91785.f90 b/gcc/testsuite/gfortran.dg/pr91785.f90
new file mode 100644
index 00000000000..fb3d964fc06
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91785.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/91785
+! Code contributed by Gerhard Steinmetz
+program p
+ complex :: a(*) ! { dg-error "Assumed size array at" }
+ real :: b(2)
+ b = a%im ! { dg-error "upper bound in the last dimension" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91801.f90 b/gcc/testsuite/gfortran.dg/pr91801.f90
new file mode 100644
index 00000000000..d2d82b88464
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91801.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/91801
+! Code contributed by Gerhard Steinmetz
+program p
+ integer, parameter :: a(2) = [2,0] ! { dg-error "Element with a value of" }
+ print *, reshape([1,2,3,4,5,6], [2,3], order=a) ! { dg-error "for the RESHAPE intrinsic near" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91802.f90 b/gcc/testsuite/gfortran.dg/pr91802.f90
new file mode 100644
index 00000000000..277d61aae82
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91802.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+! Code contributed by Gerhard Steinmetz
+! PR fortran/91802
+module m
+ real :: x
+ dimension :: x(1,2,1,2,1,2,1,2)
+ codimension :: x[1,2,1,2,1,2,1,*] ! { dg-error "exceeds 15" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91864.f90 b/gcc/testsuite/gfortran.dg/pr91864.f90
new file mode 100644
index 00000000000..a17187dcdc0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91864.f90
@@ -0,0 +1,22 @@
+program p
+ integer :: i
+ read (*,*) i%kind ! { dg-error "Expecting variable or io-implied-do" }
+end
+
+subroutine t
+ integer, allocatable :: x(:)
+ integer :: stat
+ allocate (x(3), stat=stat%kind) ! { dg-error "cannot be a constant" }
+end
+
+subroutine u
+ integer, allocatable :: x(:)
+ integer :: stat
+ allocate (x(3), stat%kind=stat) ! { dg-error "Unexpected constant" }
+end
+
+subroutine v
+ integer, allocatable :: x(:)
+ integer :: stat
+ deallocate (x, stat%kind=stat) ! { dg-error "Unexpected constant" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91942.f90 b/gcc/testsuite/gfortran.dg/pr91942.f90
new file mode 100644
index 00000000000..cd237d38660
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91942.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR fortran/91942
+! Code contributed by Gerhard Steinmetz
+program p
+ integer :: i
+ backspace (iostat=i%kind) ! { dg-error "Expecting a variable at" }
+ endfile (iostat=i%kind) ! { dg-error "Expecting END PROGRAM" }
+ flush (iostat=i%kind) ! { dg-error "Expecting a variable at" }
+ rewind (iostat=i%kind) ! { dg-error "Expecting a variable at" }
+end
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_22.f03 b/gcc/testsuite/gfortran.dg/typebound_call_22.f03
index b9f0b712573..30f86937fe2 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_22.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_22.f03
@@ -26,4 +26,4 @@ program test
call x%bar ()
end program
-! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" } }
+! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" { xfail *-*-* } } }
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index d710582a915..e90ae6a89cb 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -338,8 +338,15 @@ propagate_with_phi (basic_block bb, gphi *phi, struct phiprop_d *phivn,
&& (!type
|| types_compatible_p
(TREE_TYPE (gimple_assign_lhs (use_stmt)), type))
- /* We cannot replace a load that may throw or is volatile. */
- && !stmt_can_throw_internal (cfun, use_stmt)))
+ /* We cannot replace a load that may throw or is volatile.
+ For volatiles the transform can change the number of
+ executions if the load is inside a loop but the address
+ computations outside (PR91812). We could relax this
+ if we guard against that appropriately. For loads that can
+ throw we could relax things if the moved loads all are
+ known to not throw. */
+ && !stmt_can_throw_internal (cfun, use_stmt)
+ && !gimple_has_volatile_ops (use_stmt)))
continue;
/* Check if we can move the loads. The def stmt of the virtual use
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 17769c88b6a..ad998aa5770 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -8276,7 +8276,9 @@ vectorizable_load (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
|| alignment_support_scheme == dr_explicit_realign)
&& !compute_in_loop)
{
- msq = vect_setup_realignment (first_stmt_info, gsi, &realignment_token,
+ msq = vect_setup_realignment (first_stmt_info_for_drptr
+ ? first_stmt_info_for_drptr
+ : first_stmt_info, gsi, &realignment_token,
alignment_support_scheme, NULL_TREE,
&at_loop);
if (alignment_support_scheme == dr_explicit_realign_optimized)
diff --git a/gcc/tree.c b/gcc/tree.c
index 337b95a85e2..36ccdae3793 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5936,8 +5936,9 @@ find_decls_types_r (tree *tp, int *ws, void *data)
{
for (tree *tem = &BLOCK_VARS (t); *tem; )
{
- if (TREE_CODE (*tem) != VAR_DECL
- || !auto_var_in_fn_p (*tem, DECL_CONTEXT (*tem)))
+ if (TREE_CODE (*tem) != LABEL_DECL
+ && (TREE_CODE (*tem) != VAR_DECL
+ || !auto_var_in_fn_p (*tem, DECL_CONTEXT (*tem))))
{
gcc_assert (TREE_CODE (*tem) != RESULT_DECL
&& TREE_CODE (*tem) != PARM_DECL);
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 348c54c0b3e..bbf9b59926b 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,20 @@
+2019-10-15 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/fptr.c (_dl_read_access_allowed): Change argument to
+ unsigned int. Adjust callers.
+ (__canonicalize_funcptr_for_compare): Change plabel type to volatile
+ unsigned int *. Load relocation offset before function pointer.
+ Add barrier to ensure ordering.
+
+2019-10-12 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/lib2funcs.S (__gcc_plt_call): Load branch target to %r21.
+ Load PIC register after branch target. Fix white space.
+ * config/pa/milli64.S ($$dyncall): Separate LINUX and non LINUX
+ implementations. Load PIC register after branch target. Don't
+ clobber function pointer when it points to function descriptor.
+ Use nullification instead of branch in LINUX implementation.
+
2019-08-12 Release Manager
* GCC 9.2.0 released.
diff --git a/libgcc/config/pa/fptr.c b/libgcc/config/pa/fptr.c
index 53440051730..5beb0b832e2 100644
--- a/libgcc/config/pa/fptr.c
+++ b/libgcc/config/pa/fptr.c
@@ -53,7 +53,7 @@ typedef int (*fixup_t) (struct link_map *, unsigned int);
extern unsigned int _GLOBAL_OFFSET_TABLE_;
static inline int
-_dl_read_access_allowed (unsigned int *addr)
+_dl_read_access_allowed (unsigned int addr)
{
int result;
@@ -76,7 +76,8 @@ __canonicalize_funcptr_for_compare (fptr_t fptr)
{
static unsigned int fixup_plabel[2] __attribute__((used));
fixup_t fixup;
- unsigned int *got, *iptr, *plabel;
+ volatile unsigned int *plabel;
+ unsigned int *got, *iptr, reloc_offset;
int i;
/* -1 and page 0 are special. -1 is used in crtend to mark the end of
@@ -91,17 +92,20 @@ __canonicalize_funcptr_for_compare (fptr_t fptr)
to the entry of the PLT stub just before the global offset table.
The second word in the plabel contains the relocation offset for the
function. */
- plabel = (unsigned int *) ((unsigned int) fptr & ~3);
- if (!_dl_read_access_allowed (plabel))
+ plabel = (volatile unsigned int *) ((unsigned int) fptr & ~3);
+ if (!_dl_read_access_allowed ((unsigned int)plabel))
return (unsigned int) fptr;
/* Load first word of candidate descriptor. It should be a pointer
with word alignment and point to memory that can be read. */
got = (unsigned int *) plabel[0];
if (((unsigned int) got & 3) != 0
- || !_dl_read_access_allowed (got))
+ || !_dl_read_access_allowed ((unsigned int)got))
return (unsigned int) fptr;
+ /* We need to load the relocation offset before the function address. */
+ reloc_offset = plabel[1];
+ __sync_synchronize();
got = (unsigned int *) (plabel[0] + GOT_FROM_PLT_STUB);
/* Return the address of the function if the plabel has been resolved. */
@@ -137,7 +141,7 @@ __canonicalize_funcptr_for_compare (fptr_t fptr)
/* Call fixup to resolve the function address. got[1] contains the
link_map pointer and plabel[1] the relocation offset. */
- fixup ((struct link_map *) got[1], plabel[1]);
+ fixup ((struct link_map *) got[1], reloc_offset);
return plabel[0];
}
diff --git a/libgcc/config/pa/lib2funcs.S b/libgcc/config/pa/lib2funcs.S
index b401b6157da..a2db5b3d3ac 100644
--- a/libgcc/config/pa/lib2funcs.S
+++ b/libgcc/config/pa/lib2funcs.S
@@ -55,13 +55,13 @@ __gcc_plt_call
; An inline version of dyncall so we don't have to worry
; about long calls to millicode, PIC and other complexities.
bb,>=,n %r22,30,L$foo
- depi 0,31,2,%r22
- ldw 4(%r22),%r19
- ldw 0(%r22),%r22
+ depi 0,31,2,%r22
+ ldw 0(%r22),%r21
+ ldw 4(%r22),%r19
L$foo
- ldsid (%r22),%r1
- mtsp %r1,%sr0
- ble 0(%sr0,%r22)
+ ldsid (%r21),%r1
+ mtsp %r1,%sr0
+ ble 0(%sr0,%r21)
copy %r31,%r2
ldw -8(%r30),%r2
diff --git a/libgcc/config/pa/milli64.S b/libgcc/config/pa/milli64.S
index 1e46f5018b9..36040e9e78d 100644
--- a/libgcc/config/pa/milli64.S
+++ b/libgcc/config/pa/milli64.S
@@ -222,19 +222,26 @@ GSYM($$dyncall)
.proc
.callinfo millicode
.entry
- bb,>=,n %r22,30,LREF(1) ; branch if not plabel address
- depi 0,31,2,%r22 ; clear the two least significant bits
- ldw 4(%r22),%r19 ; load new LTP value
- ldw 0(%r22),%r22 ; load address of target
-LSYM(1)
#ifdef LINUX
- bv %r0(%r22) ; branch to the real target
+ extru,<> %r22,30,1,%r0 ; nullify if plabel bit set
+ bv,n %r0(%r22) ; branch to target
+ ldw -2(%r22),%r21 ; load address of target
+ bv %r0(%r21) ; branch to the real target
+ ldw 2(%r22),%r19 ; load new LTP value
#else
+ bb,>=,n %r22,30,LREF(1) ; branch if not plabel address
+ ldw -2(%r22),%r21 ; load address of target to r21
+ ldsid (%sr0,%r21),%r1 ; get the "space ident" selected by r21
+ ldw 2(%r22),%r19 ; load new LTP value
+ mtsp %r1,%sr0 ; move that space identifier into sr0
+ be 0(%sr0,%r21) ; branch to the real target
+ stw %r2,-24(%r30) ; save return address into frame marker
+LSYM(1)
ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22
mtsp %r1,%sr0 ; move that space identifier into sr0
- be 0(%sr0,%r22) ; branch to the real target
-#endif
+ be 0(%sr0,%r22) ; branch to the target
stw %r2,-24(%r30) ; save return address into frame marker
+#endif
.exit
.procend
#endif