summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-08 13:31:19 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-08 13:31:19 +0000
commit2307c21b4bc4f77e62d170023a6b0d97a2c5b2f1 (patch)
tree738c91081194ee06e9d6fca46a61d855ae6e6607
parent27fbd5b67b69cb35ed6cdd78a5ae7f0315e913f2 (diff)
downloadgcc-2307c21b4bc4f77e62d170023a6b0d97a2c5b2f1.tar.gz
2014-04-08 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn rev.209216...}} git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@209217 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.MELT4
-rw-r--r--Makefile.def1
-rw-r--r--Makefile.in1
-rw-r--r--gcc/ChangeLog268
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in6
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/gcc-interface/Makefile.in16
-rw-r--r--gcc/ada/s-intman-android.adb331
-rw-r--r--gcc/ada/s-linux-android.ads112
-rw-r--r--gcc/ada/sigtramp-armdroid.c161
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c.opt2
-rw-r--r--gcc/cgraph.c41
-rw-r--r--gcc/cgraph.h2
-rw-r--r--gcc/cgraphclones.c333
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/config/arm/arm.h13
-rw-r--r--gcc/config/arm/arm.md22
-rw-r--r--gcc/config/arm/cortex-a53.md4
-rw-r--r--gcc/config/arm/predicates.md8
-rw-r--r--gcc/config/avr/avr-arch.h62
-rw-r--r--gcc/config/avr/avr-c.c5
-rw-r--r--gcc/config/avr/avr-devices.c6
-rw-r--r--gcc/config/avr/avr-mcus.def519
-rw-r--r--gcc/config/avr/avr.c2
-rw-r--r--gcc/config/avr/avr.h5
-rw-r--r--gcc/config/avr/avr.md2
-rw-r--r--gcc/config/avr/driver-avr.c6
-rw-r--r--gcc/config/avr/genmultilib.awk14
-rw-r--r--gcc/config/elfos.h2
-rw-r--r--gcc/config/moxie/moxie.md4
-rw-r--r--gcc/config/pa/pa.c20
-rw-r--r--gcc/config/rl78/rl78-expand.md17
-rw-r--r--gcc/cp/ChangeLog51
-rw-r--r--gcc/cp/class.c111
-rw-r--r--gcc/cp/decl.c64
-rw-r--r--gcc/cp/semantics.c17
-rw-r--r--gcc/doc/invoke.texi53
-rw-r--r--gcc/dwarf2out.c12
-rw-r--r--gcc/explow.c3
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/check.c4
-rw-r--r--gcc/fortran/trans-types.c26
-rw-r--r--gcc/gcse.c71
-rw-r--r--gcc/gimple-expr.c18
-rw-r--r--gcc/gimple-expr.h1
-rw-r--r--gcc/gimple-low.c10
-rw-r--r--gcc/gimple.c5
-rw-r--r--gcc/gimplify.c19
-rw-r--r--gcc/gimplify.h1
-rw-r--r--gcc/graphite-scop-detection.c18
-rw-r--r--gcc/graphite-sese-to-poly.c1
-rw-r--r--gcc/haifa-sched.c6
-rw-r--r--gcc/ipa-devirt.c2
-rw-r--r--gcc/ipa-inline-transform.c2
-rw-r--r--gcc/ipa-inline.c2
-rw-r--r--gcc/ipa.c16
-rw-r--r--gcc/lto-cgraph.c8
-rw-r--r--gcc/lto-streamer-in.c3
-rw-r--r--gcc/lto-streamer-out.c16
-rw-r--r--gcc/testsuite/ChangeLog146
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn25.C3
-rw-r--r--gcc/testsuite/g++.dg/dso/dlclose1-dso.cc9
-rw-r--r--gcc/testsuite/g++.dg/dso/dlclose1.C30
-rw-r--r--gcc/testsuite/g++.dg/ext/vla14.C23
-rw-r--r--gcc/testsuite/g++.dg/ext/vla15.C20
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-1.C50
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-2.C15
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-3.C81
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-4.C85
-rw-r--r--gcc/testsuite/g++.dg/pr49718.C3
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60609.C252
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60746.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60750.C21
-rw-r--r--gcc/testsuite/g++.dg/warn/Weff1.C5
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-2.C30
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-3.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-4.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C21
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload21.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb121.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr28865.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60655-1.c31
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-6.c12
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-7.c12
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60740.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60785.c27
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_1.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60766.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60505.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60656.c45
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60657.c13
-rw-r--r--gcc/testsuite/gcc.target/avr/dev-specific-rmw.c13
-rw-r--r--gcc/testsuite/gfortran.dg/warn_conversion_4.f906
-rw-r--r--gcc/testsuite/gnat.dg/test_raise_from_pure.adb2
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp26
-rw-r--r--gcc/testsuite/lib/target-supports.exp9
-rw-r--r--gcc/tree-cfgcleanup.c3
-rw-r--r--gcc/tree-pretty-print.c6
-rw-r--r--gcc/tree-ssa-loop-ivopts.c9
-rw-r--r--gcc/tree-ssa-operands.c6
-rw-r--r--gcc/tree-ssanames.c2
-rw-r--r--gcc/tree-streamer-out.c8
-rw-r--r--gcc/tree-streamer.c31
-rw-r--r--gcc/tree-streamer.h5
-rw-r--r--gcc/tree-vect-loop.c21
-rw-r--r--gcc/tree-vect-stmts.c16
-rw-r--r--gcc/tree-vectorizer.h6
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/testsuite/20_util/exchange/1.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/40925.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc6
121 files changed, 3213 insertions, 747 deletions
diff --git a/ChangeLog b/ChangeLog
index 587843f29c7..5ddacbe6994 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR bootstrap/60620
+ * Makefile.def (dependencies): Make gnattools depend on libstdc++-v3.
+ * Makefile.in: Regenerate.
+
2014-03-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* Makefile.def (dependencies): Make all-ld depend on all-binutils
diff --git a/ChangeLog.MELT b/ChangeLog.MELT
index f8e58b209e1..702cee1752d 100644
--- a/ChangeLog.MELT
+++ b/ChangeLog.MELT
@@ -1,5 +1,9 @@
+2014-04-08 Basile Starynkevitch <basile@starynkevitch.net>
+ {{merge using svnmerge.py with trunk GCC 4.9 svn
+ rev.209216...}}
+
2014-04-03 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn
rev.209052...}}
diff --git a/Makefile.def b/Makefile.def
index cfb81d3621b..ec2b0f27810 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -336,6 +336,7 @@ dependencies = { module=all-libcpp; on=all-intl; };
dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
+dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; };
dependencies = { module=all-lto-plugin; on=all-libiberty; };
diff --git a/Makefile.in b/Makefile.in
index f90e34a0368..bf06dce8a2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -47249,6 +47249,7 @@ all-stage4-fixincludes: maybe-all-stage4-libiberty
all-stageprofile-fixincludes: maybe-all-stageprofile-libiberty
all-stagefeedback-fixincludes: maybe-all-stagefeedback-libiberty
all-gnattools: maybe-all-target-libada
+all-gnattools: maybe-all-target-libstdc++-v3
all-lto-plugin: maybe-all-libiberty
all-stage1-lto-plugin: maybe-all-stage1-libiberty
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 20447da43ba..f17809b1ddc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,271 @@
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60706
+ * tree-pretty-print.c (pp_double_int): For HWI32 hosts with
+ a 64bit widest int print double-int similar to on HWI64 hosts.
+
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Treat
+ default defs properly.
+
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * doc/invoke (Wnon-virtual-dtor): Update to match implementation.
+ (Weffc++): Likewise.
+
+2014-04-07 Jan Hubicka <hubcika@ucw.cz>
+
+ * ipa-devirt.c (maybe_record_node): When node is not recorded,
+ set completep to false rather than true.
+
+2014-04-07 Douglas B Rupp <rupp@adacore.com>
+
+ PR target/60504
+ * config/arm/arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Expose from
+ ARM_TARGET2_DWARF_FORMAT.
+
+2014-04-07 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/60609
+ * config/arm/arm.h (ASM_OUTPUT_CASE_END): Remove.
+ (LABEL_ALIGN_AFTER_BARRIER): Align barriers which occur after
+ ADDR_DIFF_VEC.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60766
+ * tree-ssa-loop-ivopts.c (cand_value_at): Compute in an unsigned type.
+ (may_eliminate_iv): Convert cand_value_at result to desired type.
+
+2014-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/60731
+ * common.opt (-fno-gnu-unique): Add.
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
+
+2014-04-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * haifa-sched.c: Fix outdated function reference and minor
+ grammar errors in introductory comment.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60750
+ * tree-ssa-operands.c (maybe_add_call_vops): Also add VDEFs
+ for noreturn calls.
+ * tree-cfgcleanup.c (fixup_noreturn_call): Do not remove VDEFs.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR debug/55794
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
+ size accounting for thunks.
+ (pa_asm_output_mi_thunk): Use final_start_function() and
+ final_end_function() to output function start and end directives.
+
+2014-04-05 Pitchumani Sivanupandi <Pitchumani.S@atmel.com>
+
+ * config/avr/avr-arch.h (avr_mcu_t): Add dev_attribute field to have device
+ specific ISA/ feature information. Remove short_sp and errata_skip ds.
+ Add avr_device_specific_features enum to have device specific info.
+ * config/avr/avr-c.c (avr_cpu_cpp_builtins): use dev_attribute to check
+ errata_skip. Add __AVR_ISA_RMW__ builtin macro if RMW ISA available.
+ * config/avr/avr-devices.c (avr_mcu_types): Update AVR_MCU macro for
+ updated device specific info.
+ * config/avr/avr-mcus.def: Merge device specific details to
+ dev_attribute field.
+ * config/avr/avr.c (avr_2word_insn_p): use dev_attribute field to check
+ errata_skip.
+ * config/avr/avr.h (AVR_HAVE_8BIT_SP): same for short sp info.
+ * config/avr/driver-avr.c (avr_device_to_as): Pass -mrmw option to
+ assembler if RMW isa supported by current device.
+ * config/avr/genmultilib.awk: Update as device info structure changed.
+ * doc/invoke.texi: Add info for __AVR_ISA_RMW__ builtin macro
+
+2014-04-04 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60656
+ * tree-vect-stmts.c (supportable_widening_operation):
+ Fix a bug that elements in a vector with vect_used_by_reduction
+ property are incorrectly reordered when the operation on it is not
+ consistant with the one in reduction operation.
+
+2014-04-04 John David Anglin <danglin@gcc.gnu.org>
+
+ PR rtl-optimization/60155
+ * gcse.c (record_set_data): New function.
+ (single_set_gcse): New function.
+ (gcse_emit_move_after): Use single_set_gcse instead of single_set.
+ (hoist_code): Likewise.
+ (get_pressure_class_and_nregs): Likewise.
+
+2014-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * explow.c (probe_stack_range): Emit a final optimization blockage.
+
+2014-04-04 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2): Fix
+ typos.
+
+2014-04-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/59626
+ * lto-cgraph.c (input_overwrite_node): Check that partitioning
+ flags are set only during streaming.
+ * ipa.c (process_references, walk_polymorphic_call_targets,
+ symtab_remove_unreachable_nodes): Drop bodies of always inline
+ after early inlining.
+ (symtab_remove_unreachable_nodes): Remove always_inline attribute.
+
+2014-04-04 Jakub Jelinek <jakub@redhat.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * dwarf2out.c (const_ok_for_output_1): Reject expressions
+ containing a NOT.
+
+2014-04-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR bootstrap/60743
+ * config/arm/cortex-a53.md (cortex_a53_fdivs): Reduce reservation
+ duration.
+ (cortex_a53_fdivd): Likewise.
+
+2014-04-04 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/60640
+ * cgraph.h (cgraph_clone_node): New parameter added to declaration.
+ Adjust all callers.
+ * cgraph.c (clone_of_p): Also return true if thunks match.
+ (verify_edge_corresponds_to_fndecl): Removed extraneous call to
+ cgraph_function_or_thunk_node and an obsolete comment.
+ * cgraphclones.c (build_function_type_skip_args): Moved upwards in the
+ file.
+ (build_function_decl_skip_args): Likewise.
+ (set_new_clone_decl_and_node_flags): New function.
+ (duplicate_thunk_for_node): Likewise.
+ (redirect_edge_duplicating_thunks): Likewise.
+ (cgraph_clone_node): New parameter args_to_skip, pass it to
+ redirect_edge_duplicating_thunks which is called instead of
+ cgraph_redirect_edge_callee.
+ (cgraph_create_virtual_clone): Pass args_to_skip to cgraph_clone_node,
+ moved setting of a lot of flags to set_new_clone_decl_and_node_flags.
+
+2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR fortran/60191
+ * fortran/trans-types.c (gfc_get_function_type): In case of recursion
+ build a variadic function type with empty argument list instead of a
+ stdarg-like function type with incomplete argument list.
+
+2014-04-04 Jeff Law <law@redhat.com>
+
+ PR target/60657
+ * config/arm/predicates.md (const_int_I_operand): New predicate.
+ (const_int_M_operand): Similarly.
+ * config/arm/arm.md (insv_zero): Use const_int_M_operand instead of
+ const_int_operand.
+ (insv_t2, extv_reg, extzv_t2): Likewise.
+ (load_multiple_with_writeback): Similarly for const_int_I_operand.
+ (pop_multiple_with_writeback_and_return): Likewise.
+ (vfp_pop_multiple_with_writeback): Likewise
+
+2014-04-04 Richard Biener <rguenther@suse.de>
+
+ PR ipa/60746
+ * tree-ssanames.c (make_ssa_name_fn): Fix assert.
+ * gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
+ non-GIMPLE_LABELs.
+ * gimplify.h (gimple_add_tmp_var_fn): Declare.
+ * gimplify.c (gimple_add_tmp_var_fn): New function.
+ * gimple-expr.h (create_tmp_reg_fn): Declare.
+ * gimple-expr.c (create_tmp_reg_fn): New function.
+ * gimple-low.c (record_vars_into): Don't change cfun.
+ * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
+ code generation without cfun.
+
+2014-04-04 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR bootstrap/60719
+ * Makefile.in (install-driver): Fix shell scripting.
+
+2014-04-03 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60505
+ * tree-vectorizer.h (struct _stmt_vec_info): Add th field as the
+ threshold of number of iterations below which no vectorization will be
+ done.
+ * tree-vect-loop.c (new_loop_vec_info):
+ Initialize LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_analyze_loop_operations):
+ Set LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_transform_loop):
+ Use LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_analyze_loop_2): Check the maximum number
+ of iterations of the loop and see if we should build the epilogue.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ * tree-streamer.h (struct streamer_tree_cache_d): Add next_idx
+ member.
+ (streamer_tree_cache_create): Adjust.
+ * tree-streamer.c (streamer_tree_cache_add_to_node_array): Adjust
+ to allow optional nodes array.
+ (streamer_tree_cache_insert_1): Use next_idx to assign idx.
+ (streamer_tree_cache_append): Likewise.
+ (streamer_tree_cache_create): Create nodes array optionally
+ as specified by parameter.
+ * lto-streamer-out.c (create_output_block): Avoid maintaining
+ the node array in the writer cache.
+ (DFS_write_tree): Remove assertion.
+ (produce_asm_for_decls): Free the out decl state hash table
+ early.
+ * lto-streamer-in.c (lto_data_in_create): Adjust for
+ streamer_tree_cache_create prototype change.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ * tree-streamer-out.c (streamer_write_chain): Do not temporarily
+ set TREE_CHAIN to NULL_TREE.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60740
+ * graphite-scop-detection.c (stmt_simple_for_scop_p): Iterate
+ over all GIMPLE_COND operands.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * doc/invoke.texi (Wnon-virtual-dtor): Adjust documentation.
+ (Weffc++): Remove Scott's numbering, merge lists and reference
+ Wnon-virtual-dtor.
+
+ c-family/
+
+ cp/
+ * class.c (accessible_nvdtor_p): New.
+ (check_bases): Don't check base destructor here ...
+ (check_bases_and_members): ... check them here. Trigger on
+ Wnon-virtual-dtor flag.
+ (finish_struct_1): Use accessible_nvdtor_p.
+
+ testsuite/
+ * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case.
+ * g++.dg/warn/Wnvdtor-2.C: New.
+ * g++.dg/warn/Wnvdtor-3.C: New.
+ * g++.dg/warn/Wnvdtor-4.C: New.
+ * g++.dg/warn/Weff1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-2.C: Delete.
+
+2014-04-03 Nick Clifton <nickc@redhat.com>
+
+ * config/rl78/rl78-expand.md (movqi): Handle (SUBREG (SYMBOL_REF))
+ properly.
+
2014-04-03 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_verify_propagated_values): Also dump symtab and
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index cd99a911103..7710f7c974b 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20140403
+20140408
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a5446a4ec83..987f20484fe 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3345,9 +3345,9 @@ install-driver: installdirs xgcc$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
- -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) \
- -( cd $(DESTDIR)$(bindir) && \
- $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) \
+ rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \
fi
-if [ ! -f gcc-cross$(exeext) ] \
&& [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index de71b062f4b..3353b89867a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,15 @@
+2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/60411
+ * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
+ * s-linux-android.ads: New file.
+ * s-intman-android.adb: Likewise.
+ * sigtramp-armdroid.c: Likewise.
+
+2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/Makefile.in (alpha-vms): Add missing line.
+
2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
PR ada/60703
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 352d6550cdc..5741bd9b841 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -536,7 +536,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $
# System.Stack_Checking.Operations is not needed on VxWorks 6 as it leads to
# an undefined symbol when building a dynamic shared library. To alleviate
# this problem and distinguish this case, we use the THREAD_KIND and include
- # the package only in kernel mode.
+ # the package only in default mode.
ifeq ($(strip $(filter-out default,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
@@ -1045,15 +1045,17 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-posix.adb \
- s-linux.ads<s-linux.ads \
+ s-intman.adb<s-intman-android.adb \
+ s-linux.ads<s-linux-android.ads \
s-osinte.adb<s-osinte-android.adb \
s-osinte.ads<s-osinte-android.ads \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-posix.adb \
- s-taspri.ads<s-taspri-posix-noaltstack.ads \
+ s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-linux-armel.ads \
+ a-exexpr.adb<a-exexpr-gcc.adb \
+ s-excmac.ads<s-excmac-arm.ads \
$(DUMMY_SOCKETS_TARGET_PAIRS)
TOOLS_TARGET_PAIRS = \
@@ -1062,7 +1064,9 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
GNATRTL_SOCKETS_OBJS =
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
- EH_MECHANISM=
+ EXTRA_LIBGNAT_OBJS+=raise-gcc.o sigtramp-armdroid.o
+ EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
+ EH_MECHANISM=-arm
THREADSLIB =
GNATLIB_SHARED = gnatlib-shared-dual
LIBRARY_VERSION := $(LIB_VERSION)
@@ -1615,6 +1619,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_
$(ATOMICS_BUILTINS_TARGET_PAIRS)
EXTRA_LIBGNAT_SRCS+=tb-alvms.c
+ override GNATRTL_ALTIVEC_OBJS=
TOOLS_TARGET_PAIRS= \
mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
@@ -3063,6 +3068,7 @@ mkdir.o : mkdir.c
socket.o : socket.c gsocket.h
sysdep.o : sysdep.c
raise.o : raise.c raise.h
+sigtramp-armdroid.o : sigtramp-armdroid.c sigtramp.h
sigtramp-armvxw.o : sigtramp-armvxw.c sigtramp.h
sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h
terminals.o : terminals.c
diff --git a/gcc/ada/s-intman-android.adb b/gcc/ada/s-intman-android.adb
new file mode 100644
index 00000000000..30a980e3e3b
--- /dev/null
+++ b/gcc/ada/s-intman-android.adb
@@ -0,0 +1,331 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2014, Free Software Foundation, Inc. --
+-- --
+-- GNARL is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- In particular, you can freely distribute your programs built with the --
+-- GNAT Pro compiler, including any required library run-time units, using --
+-- any licensing terms of your choosing. See the AdaCore Software License --
+-- for full details. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the Android version of this package
+
+-- Make a careful study of all signals available under the OS, to see which
+-- need to be reserved, kept always unmasked, or kept always unmasked. Be on
+-- the lookout for special signals that may be used by the thread library.
+
+-- Since this is a multi target file, the signal <-> exception mapping
+-- is simple minded. If you need a more precise and target specific
+-- signal handling, create a new s-intman.adb that will fit your needs.
+
+-- This file assumes that:
+
+-- SIGFPE, SIGILL, SIGSEGV and SIGBUS exist. They are mapped as follows:
+-- SIGPFE => Constraint_Error
+-- SIGILL => Program_Error
+-- SIGSEGV => Storage_Error
+-- SIGBUS => Storage_Error
+
+-- SIGINT exists and will be kept unmasked unless the pragma
+-- Unreserve_All_Interrupts is specified anywhere in the application.
+
+-- System.OS_Interface contains the following:
+-- SIGADAABORT: the signal that will be used to abort tasks.
+-- Unmasked: the OS specific set of signals that should be unmasked in
+-- all the threads. SIGADAABORT is unmasked by
+-- default
+-- Reserved: the OS specific set of signals that are reserved.
+
+with System.Task_Primitives;
+
+package body System.Interrupt_Management is
+
+ use Interfaces.C;
+ use System.OS_Interface;
+
+ type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID;
+ Exception_Interrupts : constant Interrupt_List :=
+ (SIGFPE, SIGILL, SIGSEGV, SIGBUS);
+
+ Unreserve_All_Interrupts : Interfaces.C.int;
+ pragma Import
+ (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
+
+ -----------------------
+ -- Local Subprograms --
+ -----------------------
+
+ procedure Signal_Trampoline
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address;
+ handler : System.Address);
+ pragma Import (C, Signal_Trampoline, "__gnat_sigtramp");
+ -- Pass the real handler to a speical function that handles unwinding by
+ -- skipping over the kernel signal frame (which doesn't contain any unwind
+ -- information).
+
+ function State (Int : Interrupt_ID) return Character;
+ pragma Import (C, State, "__gnat_get_interrupt_state");
+ -- Get interrupt state. Defined in init.c The input argument is the
+ -- interrupt number, and the result is one of the following:
+
+ procedure Map_Signal
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address);
+ -- This function identifies the Ada exception to be raised using the
+ -- information when the system received a synchronous signal.
+
+----------------
+-- Map_Signal --
+----------------
+
+ procedure Map_Signal
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address)
+ is
+ pragma Unreferenced (siginfo);
+ pragma Unreferenced (ucontext);
+
+ begin
+
+ -- Check that treatment of exception propagation here is consistent with
+ -- treatment of the abort signal in System.Task_Primitives.Operations.
+
+ case signo is
+ when SIGFPE =>
+ raise Constraint_Error;
+ when SIGILL =>
+ raise Program_Error;
+ when SIGSEGV =>
+ raise Storage_Error;
+ when SIGBUS =>
+ raise Storage_Error;
+ when others =>
+ null;
+ end case;
+ end Map_Signal;
+
+----------------------
+-- Notify_Exception --
+----------------------
+
+ User : constant Character := 'u';
+ Runtime : constant Character := 'r';
+ Default : constant Character := 's';
+ -- 'n' this interrupt not set by any Interrupt_State pragma
+ -- 'u' Interrupt_State pragma set state to User
+ -- 'r' Interrupt_State pragma set state to Runtime
+ -- 's' Interrupt_State pragma set state to System (use "default"
+ -- system handler)
+
+ procedure Notify_Exception
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address);
+ -- This function is the signal handler and calls a trampoline subprogram
+ -- that adjusts the unwind information so the ARM unwinder can find it's
+ -- way back to the context of the originating subprogram. Compare with
+ -- __gnat_error_handler for non-tasking programs.
+
+ ----------------------
+ -- Notify_Exception --
+ ----------------------
+
+ Signal_Mask : aliased sigset_t;
+ -- The set of signals handled by Notify_Exception
+
+ procedure Notify_Exception
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address)
+ is
+ Result : Interfaces.C.int;
+
+ begin
+ -- With the __builtin_longjmp, the signal mask is not restored, so we
+ -- need to restore it explicitly. ??? We don't use __builtin_longjmp
+ -- anymore, so do we still need this? */
+
+ Result := pthread_sigmask (SIG_UNBLOCK, Signal_Mask'Access, null);
+ pragma Assert (Result = 0);
+
+ -- Perform the necessary context adjustments prior to calling the
+ -- trampoline subprogram with the "real" signal handler.
+
+ Adjust_Context_For_Raise (signo, ucontext);
+
+ Signal_Trampoline (signo, siginfo, ucontext, Map_Signal'Address);
+ end Notify_Exception;
+
+ ----------------
+ -- Initialize --
+ ----------------
+
+ Initialized : Boolean := False;
+
+ procedure Initialize is
+ act : aliased struct_sigaction;
+ old_act : aliased struct_sigaction;
+ Result : System.OS_Interface.int;
+
+ Use_Alternate_Stack : constant Boolean :=
+ System.Task_Primitives.Alternate_Stack_Size /= 0;
+ -- Whether to use an alternate signal stack for stack overflows
+
+ begin
+ if Initialized then
+ return;
+ end if;
+
+ Initialized := True;
+
+ -- Need to call pthread_init very early because it is doing signal
+ -- initializations.
+
+ pthread_init;
+
+ Abort_Task_Interrupt := SIGADAABORT;
+
+ act.sa_handler := Notify_Exception'Address;
+
+ -- Setting SA_SIGINFO asks the kernel to pass more than just the signal
+ -- number argument to the handler when it is called. The set of extra
+ -- parameters includes a pointer to the interrupted context, which the
+ -- ZCX propagation scheme needs.
+
+ -- Most man pages for sigaction mention that sa_sigaction should be set
+ -- instead of sa_handler when SA_SIGINFO is on. In practice, the two
+ -- fields are actually union'ed and located at the same offset.
+
+ -- On some targets, we set sa_flags to SA_NODEFER so that during the
+ -- handler execution we do not change the Signal_Mask to be masked for
+ -- the Signal.
+
+ -- This is a temporary fix to the problem that the Signal_Mask is not
+ -- restored after the exception (longjmp) from the handler. The right
+ -- fix should be made in sigsetjmp so that we save the Signal_Set and
+ -- restore it after a longjmp.
+
+ -- We set SA_NODEFER to be compatible with what is done in
+ -- __gnat_error_handler.
+
+ Result := sigemptyset (Signal_Mask'Access);
+ pragma Assert (Result = 0);
+
+ -- Add signals that map to Ada exceptions to the mask
+
+ for J in Exception_Interrupts'Range loop
+ if State (Exception_Interrupts (J)) /= Default then
+ Result :=
+ sigaddset
+ (Signal_Mask'Access, Signal (Exception_Interrupts (J)));
+ pragma Assert (Result = 0);
+ end if;
+ end loop;
+
+ act.sa_mask := Signal_Mask;
+
+ pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False));
+ pragma Assert (Reserve = (Interrupt_ID'Range => False));
+
+ -- Process state of exception signals
+
+ for J in Exception_Interrupts'Range loop
+ if State (Exception_Interrupts (J)) /= User then
+ Keep_Unmasked (Exception_Interrupts (J)) := True;
+ Reserve (Exception_Interrupts (J)) := True;
+
+ if State (Exception_Interrupts (J)) /= Default then
+ act.sa_flags := SA_NODEFER + SA_RESTART + SA_SIGINFO;
+
+ if Use_Alternate_Stack
+ and then Exception_Interrupts (J) = SIGSEGV
+ then
+ act.sa_flags := act.sa_flags + SA_ONSTACK;
+ end if;
+
+ Result :=
+ sigaction
+ (Signal (Exception_Interrupts (J)), act'Unchecked_Access,
+ old_act'Unchecked_Access);
+ pragma Assert (Result = 0);
+ end if;
+ end if;
+ end loop;
+
+ if State (Abort_Task_Interrupt) /= User then
+ Keep_Unmasked (Abort_Task_Interrupt) := True;
+ Reserve (Abort_Task_Interrupt) := True;
+ end if;
+
+ -- Set SIGINT to unmasked state as long as it is not in "User" state.
+ -- Check for Unreserve_All_Interrupts last.
+
+ if State (SIGINT) /= User then
+ Keep_Unmasked (SIGINT) := True;
+ Reserve (SIGINT) := True;
+ end if;
+
+ -- Check all signals for state that requires keeping them unmasked and
+ -- reserved.
+
+ for J in Interrupt_ID'Range loop
+ if State (J) = Default or else State (J) = Runtime then
+ Keep_Unmasked (J) := True;
+ Reserve (J) := True;
+ end if;
+ end loop;
+
+ -- Add the set of signals that must always be unmasked for this target
+
+ for J in Unmasked'Range loop
+ Keep_Unmasked (Interrupt_ID (Unmasked (J))) := True;
+ Reserve (Interrupt_ID (Unmasked (J))) := True;
+ end loop;
+
+ -- Add target-specific reserved signals
+
+ for J in Reserved'Range loop
+ Reserve (Interrupt_ID (Reserved (J))) := True;
+ end loop;
+
+ -- Process pragma Unreserve_All_Interrupts. This overrides any settings
+ -- due to pragma Interrupt_State:
+
+ if Unreserve_All_Interrupts /= 0 then
+ Keep_Unmasked (SIGINT) := False;
+ Reserve (SIGINT) := False;
+ end if;
+
+ -- We do not really have Signal 0. We just use this value to identify
+ -- non-existent signals (see s-intnam.ads). Therefore, Signal should not
+ -- be used in all signal related operations hence mark it as reserved.
+
+ Reserve (0) := True;
+ end Initialize;
+
+end System.Interrupt_Management;
diff --git a/gcc/ada/s-linux-android.ads b/gcc/ada/s-linux-android.ads
new file mode 100644
index 00000000000..3e5f1363194
--- /dev/null
+++ b/gcc/ada/s-linux-android.ads
@@ -0,0 +1,112 @@
+------------------------------------------------------------------------------
+-- --
+-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . L I N U X --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2014, Free Software Foundation, Inc. --
+-- --
+-- GNARL is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- In particular, you can freely distribute your programs built with the --
+-- GNAT Pro compiler, including any required library run-time units, using --
+-- any licensing terms of your choosing. See the AdaCore Software License --
+-- for full details. --
+-- --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the Android version of this package
+
+-- This package encapsulates cpu specific differences between implementations
+-- of GNU/Linux, in order to share s-osinte-linux.ads.
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+
+package System.Linux is
+ pragma Preelaborate;
+
+ ------------
+ -- time_t --
+ ------------
+
+ type time_t is new Long_Integer;
+
+ -----------
+ -- Errno --
+ -----------
+
+ EAGAIN : constant := 11;
+ EINTR : constant := 4;
+ EINVAL : constant := 22;
+ ENOMEM : constant := 12;
+ EPERM : constant := 1;
+ ETIMEDOUT : constant := 110;
+
+ -------------
+ -- Signals --
+ -------------
+
+ SIGHUP : constant := 1; -- hangup
+ SIGINT : constant := 2; -- interrupt (rubout)
+ SIGQUIT : constant := 3; -- quit (ASCD FS)
+ SIGILL : constant := 4; -- illegal instruction (not reset)
+ SIGTRAP : constant := 5; -- trace trap (not reset)
+ SIGIOT : constant := 6; -- IOT instruction
+ SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
+ SIGFPE : constant := 8; -- floating point exception
+ SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
+ SIGBUS : constant := 7; -- bus error
+ SIGSEGV : constant := 11; -- segmentation violation
+ SIGPIPE : constant := 13; -- write on a pipe with no one to read it
+ SIGALRM : constant := 14; -- alarm clock
+ SIGTERM : constant := 15; -- software termination signal from kill
+ SIGUSR1 : constant := 10; -- user defined signal 1
+ SIGUSR2 : constant := 12; -- user defined signal 2
+ SIGCLD : constant := 17; -- alias for SIGCHLD
+ SIGCHLD : constant := 17; -- child status change
+ SIGPWR : constant := 30; -- power-fail restart
+ SIGWINCH : constant := 28; -- window size change
+ SIGURG : constant := 23; -- urgent condition on IO channel
+ SIGPOLL : constant := 29; -- pollable event occurred
+ SIGIO : constant := 29; -- I/O now possible (4.2 BSD)
+ SIGLOST : constant := 29; -- File lock lost
+ SIGSTOP : constant := 19; -- stop (cannot be caught or ignored)
+ SIGTSTP : constant := 20; -- user stop requested from tty
+ SIGCONT : constant := 18; -- stopped process has been continued
+ SIGTTIN : constant := 21; -- background tty read attempted
+ SIGTTOU : constant := 22; -- background tty write attempted
+ SIGVTALRM : constant := 26; -- virtual timer expired
+ SIGPROF : constant := 27; -- profiling timer expired
+ SIGXCPU : constant := 24; -- CPU time limit exceeded
+ SIGXFSZ : constant := 25; -- filesize limit exceeded
+ SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
+ SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
+ SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
+ SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
+ SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
+
+ -- struct_sigaction offsets
+
+ sa_handler_pos : constant := 0;
+ sa_mask_pos : constant := Standard'Address_Size / 8;
+ sa_flags_pos : constant := 4 + sa_mask_pos;
+
+ SA_SIGINFO : constant := 16#00000004#;
+ SA_ONSTACK : constant := 16#08000000#;
+ SA_RESTART : constant := 16#10000000#;
+ SA_NODEFER : constant := 16#40000000#;
+
+end System.Linux;
diff --git a/gcc/ada/sigtramp-armdroid.c b/gcc/ada/sigtramp-armdroid.c
new file mode 100644
index 00000000000..fb522dfcd99
--- /dev/null
+++ b/gcc/ada/sigtramp-armdroid.c
@@ -0,0 +1,161 @@
+/****************************************************************************
+ * *
+ * GNAT COMPILER COMPONENTS *
+ * *
+ * S I G T R A M P *
+ * *
+ * Asm Implementation File *
+ * *
+ * Copyright (C) 2014, Free Software Foundation, Inc. *
+ * *
+ * GNAT is free software; you can redistribute it and/or modify it under *
+ * terms of the GNU General Public License as published by the Free Soft- *
+ * ware Foundation; either version 3, or (at your option) any later ver- *
+ * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
+ * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+ * or FITNESS FOR A PARTICULAR PURPOSE. *
+ * *
+ * As a special exception under Section 7 of GPL version 3, you are granted *
+ * additional permissions described in the GCC Runtime Library Exception, *
+ * version 3.1, as published by the Free Software Foundation. *
+ * *
+ * In particular, you can freely distribute your programs built with the *
+ * GNAT Pro compiler, including any required library run-time units, using *
+ * any licensing terms of your choosing. See the AdaCore Software License *
+ * for full details. *
+ * *
+ * GNAT was originally developed by the GNAT team at New York University. *
+ * Extensive contributions were provided by Ada Core Technologies Inc. *
+ * *
+ ****************************************************************************/
+
+/******************************************************
+ * ARM-Android version of the __gnat_sigtramp service *
+ ******************************************************/
+
+#include "sigtramp.h"
+/* See sigtramp.h for a general explanation of functionality. */
+
+/* ----------------------
+ -- General comments --
+ ----------------------
+
+ Stubs are generated from toplevel asms,
+ The general idea is to establish CFA as the sigcontext
+ and state where to find the registers as offsets from there.
+
+ We support stubs for VxWorks and Android, providing unwind info for
+ common registers. We might need variants with support for floating
+ point or altivec registers as well at some point.
+
+ For Android it would be simpler to write this in Asm since there's only
+ one variant, but to keep it looking like the VxWorks stubs,
+ C is the choice for our toplevel interface.
+
+ Note that the registers we "restore" here are those to which we have
+ direct access through the system sigcontext structure, which includes
+ only a partial set of the non-volatiles ABI-wise. */
+
+/* -----------------------------------------
+ -- Protypes for our internal asm stubs --
+ -----------------------------------------
+
+ The registers are expected to be at SIGCONTEXT + 12 (reference the
+ sicontext structure in asm/sigcontext.h which describes the first
+ 3 * 4byte fields.) Even though our symbols will remain local, the
+ prototype claims "extern" and not "static" to prevent compiler complaints
+ about a symbol used but never defined. */
+
+/* sigtramp stub providing unwind info for common registers. */
+
+extern void __gnat_sigtramp_common
+ (int signo, void *siginfo, void *sigcontext,
+ __sigtramphandler_t * handler);
+
+void __gnat_sigtramp (int signo, void *si, void *sc,
+ __sigtramphandler_t * handler)
+ __attribute__((optimize(2)));
+
+void __gnat_sigtramp (int signo, void *si, void *ucontext,
+ __sigtramphandler_t * handler)
+{
+ struct sigcontext *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
+
+ __gnat_sigtramp_common (signo, si, mcontext, handler);
+}
+
+/* asm string construction helpers. */
+
+#define STR(TEXT) #TEXT
+/* stringify expanded TEXT, surrounding it with double quotes. */
+
+#define S(E) STR(E)
+/* stringify E, which will resolve as text but may contain macros
+ still to be expanded. */
+
+/* asm (TEXT) outputs <tab>TEXT. These facilitate the output of
+ multiline contents: */
+#define TAB(S) "\t" S
+#define CR(S) S "\n"
+
+#undef TCR
+#define TCR(S) TAB(CR(S))
+
+/* Trampoline body block
+ --------------------- */
+
+#define SIGTRAMP_BODY \
+CR("") \
+TCR("# Allocate frame and also save r2 which is the argument register") \
+TCR("# containing the sigcontext, so that we can restore it during") \
+TCR("# unwinding and thereby load the rest of the desired context.") \
+TCR("stmfd sp!, {r2, r3, lr}") \
+TCR("# The unwinder undo's these operations in reverse order so starting") \
+TCR("# from bottom, restore r2 from the current vsp location, move r2 into") \
+TCR("# the vsp, add 12 bytes to get the start of the register save area") \
+TCR("# then restore the 15 general purpose registers of the frame which") \
+TCR("# raised the signal.") \
+TCR(".save {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15}") \
+TCR(".pad #12") \
+TCR(".movsp r2") \
+TCR(".save {r2}") \
+TCR("# Call the real handler. The signo, siginfo and sigcontext") \
+TCR("# arguments are the same as those we received in r0, r1 and r2.") \
+TCR("blx r3") \
+TCR("# Restore our callee-saved items, release our frame and return") \
+TCR("# (should never get here!).") \
+TCR("ldmfd sp, {r2, r3, pc}")
+
+/* Symbol definition block
+ ----------------------- */
+
+#define SIGTRAMP_START(SYM) \
+CR("# " S(SYM) " unwind trampoline") \
+TCR(".type " S(SYM) ", %function") \
+CR("") \
+CR(S(SYM) ":") \
+TCR(".fnstart")
+
+/* Symbol termination block
+ ------------------------ */
+
+#define SIGTRAMP_END(SYM) \
+CR(".fnend") \
+TCR(".size " S(SYM) ", .-" S(SYM))
+
+/*----------------------------
+ -- And now, the real code --
+ ---------------------------- */
+
+/* Text section start. The compiler isn't aware of that switch. */
+
+asm (".text\n"
+ TCR(".align 2"));
+
+/* sigtramp stub for common registers. */
+
+#define TRAMP_COMMON __gnat_sigtramp_common
+
+asm (SIGTRAMP_START(TRAMP_COMMON));
+asm (SIGTRAMP_BODY);
+asm (SIGTRAMP_END(TRAMP_COMMON));
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index c83bf5497da..e2b047482c5 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
+
2014-04-02 Marek Polacek <polacek@redhat.com>
* c-common.h (c_expand_expr): Remove declaration.
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 7d0a2cd4ac6..2abf66cb781 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -569,7 +569,7 @@ C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
Warn when non-templatized friend functions are declared within a template
Wnon-virtual-dtor
-C++ ObjC++ Var(warn_nonvdtor) Warning
+C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
Warn about non-virtual destructors
Wnonnull
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index dcab9848307..be3661af6d3 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1479,13 +1479,14 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
{
if (TREE_CODE (lhs) == SSA_NAME)
{
+ tree var = create_tmp_reg_fn (DECL_STRUCT_FUNCTION (e->caller->decl),
+ TREE_TYPE (lhs), NULL);
+ var = get_or_create_ssa_default_def
+ (DECL_STRUCT_FUNCTION (e->caller->decl), var);
+ gimple set_stmt = gimple_build_assign (lhs, var);
gsi = gsi_for_stmt (new_stmt);
-
- tree var = create_tmp_var (TREE_TYPE (lhs), NULL);
- tree def = get_or_create_ssa_default_def
- (DECL_STRUCT_FUNCTION (e->caller->decl), var);
- gimple set_stmt = gimple_build_assign (lhs, def);
- gsi_insert_before (&gsi, set_stmt, GSI_SAME_STMT);
+ gsi_insert_before_without_update (&gsi, set_stmt, GSI_SAME_STMT);
+ update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), set_stmt);
}
gimple_call_set_lhs (new_stmt, NULL_TREE);
update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
@@ -2543,12 +2544,34 @@ collect_callers_of_node (struct cgraph_node *node)
return redirect_callers;
}
-/* Return TRUE if NODE2 is equivalent to NODE or its clone. */
+/* Return TRUE if NODE2 a clone of NODE or is equivalent to it. */
+
static bool
clone_of_p (struct cgraph_node *node, struct cgraph_node *node2)
{
+ bool skipped_thunk = false;
node = cgraph_function_or_thunk_node (node, NULL);
node2 = cgraph_function_or_thunk_node (node2, NULL);
+
+ /* There are no virtual clones of thunks so check former_clone_of or if we
+ might have skipped thunks because this adjustments are no longer
+ necessary. */
+ while (node->thunk.thunk_p)
+ {
+ if (node2->former_clone_of == node->decl)
+ return true;
+ if (!node->thunk.this_adjusting)
+ return false;
+ node = cgraph_function_or_thunk_node (node->callees->callee, NULL);
+ skipped_thunk = true;
+ }
+
+ if (skipped_thunk
+ && (!node2->clone_of
+ || !node2->clone.args_to_skip
+ || !bitmap_bit_p (node2->clone.args_to_skip, 0)))
+ return false;
+
while (node != node2 && node2)
node2 = node2->clone_of;
return node2 != NULL;
@@ -2648,10 +2671,8 @@ verify_edge_corresponds_to_fndecl (struct cgraph_edge *e, tree decl)
node = cgraph_function_or_thunk_node (node, NULL);
if (e->callee->former_clone_of != node->decl
- /* IPA-CP sometimes redirect edge to clone and then back to the former
- function. This ping-pong has to go, eventually. */
&& (node != cgraph_function_or_thunk_node (e->callee, NULL))
- && !clone_of_p (cgraph_function_or_thunk_node (node, NULL), e->callee))
+ && !clone_of_p (node, e->callee))
return true;
else
return false;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 59d9ce66845..15310d88861 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -890,7 +890,7 @@ struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *,
unsigned, gcov_type, int, bool);
struct cgraph_node * cgraph_clone_node (struct cgraph_node *, tree, gcov_type,
int, bool, vec<cgraph_edge_p>,
- bool, struct cgraph_node *);
+ bool, struct cgraph_node *, bitmap);
tree clone_function_name (tree decl, const char *);
struct cgraph_node * cgraph_create_virtual_clone (struct cgraph_node *old_node,
vec<cgraph_edge_p>,
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index b2eb8ab5ce9..257939cb022 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -168,6 +168,212 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n,
return new_edge;
}
+/* Build variant of function type ORIG_TYPE skipping ARGS_TO_SKIP and the
+ return value if SKIP_RETURN is true. */
+
+static tree
+build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
+ bool skip_return)
+{
+ tree new_type = NULL;
+ tree args, new_args = NULL, t;
+ tree new_reversed;
+ int i = 0;
+
+ for (args = TYPE_ARG_TYPES (orig_type); args && args != void_list_node;
+ args = TREE_CHAIN (args), i++)
+ if (!args_to_skip || !bitmap_bit_p (args_to_skip, i))
+ new_args = tree_cons (NULL_TREE, TREE_VALUE (args), new_args);
+
+ new_reversed = nreverse (new_args);
+ if (args)
+ {
+ if (new_reversed)
+ TREE_CHAIN (new_args) = void_list_node;
+ else
+ new_reversed = void_list_node;
+ }
+
+ /* Use copy_node to preserve as much as possible from original type
+ (debug info, attribute lists etc.)
+ Exception is METHOD_TYPEs must have THIS argument.
+ When we are asked to remove it, we need to build new FUNCTION_TYPE
+ instead. */
+ if (TREE_CODE (orig_type) != METHOD_TYPE
+ || !args_to_skip
+ || !bitmap_bit_p (args_to_skip, 0))
+ {
+ new_type = build_distinct_type_copy (orig_type);
+ TYPE_ARG_TYPES (new_type) = new_reversed;
+ }
+ else
+ {
+ new_type
+ = build_distinct_type_copy (build_function_type (TREE_TYPE (orig_type),
+ new_reversed));
+ TYPE_CONTEXT (new_type) = TYPE_CONTEXT (orig_type);
+ }
+
+ if (skip_return)
+ TREE_TYPE (new_type) = void_type_node;
+
+ /* This is a new type, not a copy of an old type. Need to reassociate
+ variants. We can handle everything except the main variant lazily. */
+ t = TYPE_MAIN_VARIANT (orig_type);
+ if (t != orig_type)
+ {
+ t = build_function_type_skip_args (t, args_to_skip, skip_return);
+ TYPE_MAIN_VARIANT (new_type) = t;
+ TYPE_NEXT_VARIANT (new_type) = TYPE_NEXT_VARIANT (t);
+ TYPE_NEXT_VARIANT (t) = new_type;
+ }
+ else
+ {
+ TYPE_MAIN_VARIANT (new_type) = new_type;
+ TYPE_NEXT_VARIANT (new_type) = NULL;
+ }
+
+ return new_type;
+}
+
+/* Build variant of function decl ORIG_DECL skipping ARGS_TO_SKIP and the
+ return value if SKIP_RETURN is true.
+
+ Arguments from DECL_ARGUMENTS list can't be removed now, since they are
+ linked by TREE_CHAIN directly. The caller is responsible for eliminating
+ them when they are being duplicated (i.e. copy_arguments_for_versioning). */
+
+static tree
+build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
+ bool skip_return)
+{
+ tree new_decl = copy_node (orig_decl);
+ tree new_type;
+
+ new_type = TREE_TYPE (orig_decl);
+ if (prototype_p (new_type)
+ || (skip_return && !VOID_TYPE_P (TREE_TYPE (new_type))))
+ new_type
+ = build_function_type_skip_args (new_type, args_to_skip, skip_return);
+ TREE_TYPE (new_decl) = new_type;
+
+ /* For declarations setting DECL_VINDEX (i.e. methods)
+ we expect first argument to be THIS pointer. */
+ if (args_to_skip && bitmap_bit_p (args_to_skip, 0))
+ DECL_VINDEX (new_decl) = NULL_TREE;
+
+ /* When signature changes, we need to clear builtin info. */
+ if (DECL_BUILT_IN (new_decl)
+ && args_to_skip
+ && !bitmap_empty_p (args_to_skip))
+ {
+ DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
+ DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
+ }
+ /* The FE might have information and assumptions about the other
+ arguments. */
+ DECL_LANG_SPECIFIC (new_decl) = NULL;
+ return new_decl;
+}
+
+/* Set flags of NEW_NODE and its decl. NEW_NODE is a newly created private
+ clone or its thunk. */
+
+static void
+set_new_clone_decl_and_node_flags (cgraph_node *new_node)
+{
+ DECL_EXTERNAL (new_node->decl) = 0;
+ DECL_COMDAT_GROUP (new_node->decl) = 0;
+ TREE_PUBLIC (new_node->decl) = 0;
+ DECL_COMDAT (new_node->decl) = 0;
+ DECL_WEAK (new_node->decl) = 0;
+ DECL_VIRTUAL_P (new_node->decl) = 0;
+ DECL_STATIC_CONSTRUCTOR (new_node->decl) = 0;
+ DECL_STATIC_DESTRUCTOR (new_node->decl) = 0;
+
+ new_node->externally_visible = 0;
+ new_node->local.local = 1;
+ new_node->lowered = true;
+}
+
+/* Duplicate thunk THUNK if necessary but make it to refer to NODE.
+ ARGS_TO_SKIP, if non-NULL, determines which parameters should be omitted.
+ Function can return NODE if no thunk is necessary, which can happen when
+ thunk is this_adjusting but we are removing this parameter. */
+
+static cgraph_node *
+duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node,
+ bitmap args_to_skip)
+{
+ cgraph_node *new_thunk, *thunk_of;
+ thunk_of = cgraph_function_or_thunk_node (thunk->callees->callee);
+
+ if (thunk_of->thunk.thunk_p)
+ node = duplicate_thunk_for_node (thunk_of, node, args_to_skip);
+
+ struct cgraph_edge *cs;
+ for (cs = node->callers; cs; cs = cs->next_caller)
+ if (cs->caller->thunk.thunk_p
+ && cs->caller->thunk.this_adjusting == thunk->thunk.this_adjusting
+ && cs->caller->thunk.fixed_offset == thunk->thunk.fixed_offset
+ && cs->caller->thunk.virtual_offset_p == thunk->thunk.virtual_offset_p
+ && cs->caller->thunk.virtual_value == thunk->thunk.virtual_value)
+ return cs->caller;
+
+ tree new_decl;
+ if (!args_to_skip)
+ new_decl = copy_node (thunk->decl);
+ else
+ {
+ /* We do not need to duplicate this_adjusting thunks if we have removed
+ this. */
+ if (thunk->thunk.this_adjusting
+ && bitmap_bit_p (args_to_skip, 0))
+ return node;
+
+ new_decl = build_function_decl_skip_args (thunk->decl, args_to_skip,
+ false);
+ }
+ gcc_checking_assert (!DECL_STRUCT_FUNCTION (new_decl));
+ gcc_checking_assert (!DECL_INITIAL (new_decl));
+ gcc_checking_assert (!DECL_RESULT (new_decl));
+ gcc_checking_assert (!DECL_RTL_SET_P (new_decl));
+
+ DECL_NAME (new_decl) = clone_function_name (thunk->decl, "artificial_thunk");
+ SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
+ DECL_SECTION_NAME (new_decl) = NULL;
+
+ new_thunk = cgraph_create_node (new_decl);
+ set_new_clone_decl_and_node_flags (new_thunk);
+ new_thunk->definition = true;
+ new_thunk->thunk = thunk->thunk;
+ new_thunk->unique_name = in_lto_p;
+ new_thunk->former_clone_of = thunk->decl;
+
+ struct cgraph_edge *e = cgraph_create_edge (new_thunk, node, NULL, 0,
+ CGRAPH_FREQ_BASE);
+ e->call_stmt_cannot_inline_p = true;
+ cgraph_call_edge_duplication_hooks (thunk->callees, e);
+ if (!expand_thunk (new_thunk, false))
+ new_thunk->analyzed = true;
+ cgraph_call_node_duplication_hooks (thunk, new_thunk);
+ return new_thunk;
+}
+
+/* If E does not lead to a thunk, simply redirect it to N. Otherwise create
+ one or more equivalent thunks for N and redirect E to the first in the
+ chain. */
+
+void
+redirect_edge_duplicating_thunks (struct cgraph_edge *e, struct cgraph_node *n,
+ bitmap args_to_skip)
+{
+ cgraph_node *orig_to = cgraph_function_or_thunk_node (e->callee);
+ if (orig_to->thunk.thunk_p)
+ n = duplicate_thunk_for_node (orig_to, n, args_to_skip);
+
+ cgraph_redirect_edge_callee (e, n);
+}
/* Create node representing clone of N executed COUNT times. Decrease
the execution counts from original node too.
@@ -190,7 +396,8 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq,
bool update_original,
vec<cgraph_edge_p> redirect_callers,
bool call_duplication_hook,
- struct cgraph_node *new_inlined_to)
+ struct cgraph_node *new_inlined_to,
+ bitmap args_to_skip)
{
struct cgraph_node *new_node = cgraph_create_empty_node ();
struct cgraph_edge *e;
@@ -243,7 +450,7 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq,
if (!e->callee
|| DECL_BUILT_IN_CLASS (e->callee->decl) != BUILT_IN_NORMAL
|| DECL_FUNCTION_CODE (e->callee->decl) != BUILT_IN_UNREACHABLE)
- cgraph_redirect_edge_callee (e, new_node);
+ redirect_edge_duplicating_thunks (e, new_node, args_to_skip);
}
@@ -292,114 +499,6 @@ clone_function_name (tree decl, const char *suffix)
return get_identifier (tmp_name);
}
-/* Build variant of function type ORIG_TYPE skipping ARGS_TO_SKIP and the
- return value if SKIP_RETURN is true. */
-
-static tree
-build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
- bool skip_return)
-{
- tree new_type = NULL;
- tree args, new_args = NULL, t;
- tree new_reversed;
- int i = 0;
-
- for (args = TYPE_ARG_TYPES (orig_type); args && args != void_list_node;
- args = TREE_CHAIN (args), i++)
- if (!args_to_skip || !bitmap_bit_p (args_to_skip, i))
- new_args = tree_cons (NULL_TREE, TREE_VALUE (args), new_args);
-
- new_reversed = nreverse (new_args);
- if (args)
- {
- if (new_reversed)
- TREE_CHAIN (new_args) = void_list_node;
- else
- new_reversed = void_list_node;
- }
-
- /* Use copy_node to preserve as much as possible from original type
- (debug info, attribute lists etc.)
- Exception is METHOD_TYPEs must have THIS argument.
- When we are asked to remove it, we need to build new FUNCTION_TYPE
- instead. */
- if (TREE_CODE (orig_type) != METHOD_TYPE
- || !args_to_skip
- || !bitmap_bit_p (args_to_skip, 0))
- {
- new_type = build_distinct_type_copy (orig_type);
- TYPE_ARG_TYPES (new_type) = new_reversed;
- }
- else
- {
- new_type
- = build_distinct_type_copy (build_function_type (TREE_TYPE (orig_type),
- new_reversed));
- TYPE_CONTEXT (new_type) = TYPE_CONTEXT (orig_type);
- }
-
- if (skip_return)
- TREE_TYPE (new_type) = void_type_node;
-
- /* This is a new type, not a copy of an old type. Need to reassociate
- variants. We can handle everything except the main variant lazily. */
- t = TYPE_MAIN_VARIANT (orig_type);
- if (t != orig_type)
- {
- t = build_function_type_skip_args (t, args_to_skip, skip_return);
- TYPE_MAIN_VARIANT (new_type) = t;
- TYPE_NEXT_VARIANT (new_type) = TYPE_NEXT_VARIANT (t);
- TYPE_NEXT_VARIANT (t) = new_type;
- }
- else
- {
- TYPE_MAIN_VARIANT (new_type) = new_type;
- TYPE_NEXT_VARIANT (new_type) = NULL;
- }
-
- return new_type;
-}
-
-/* Build variant of function decl ORIG_DECL skipping ARGS_TO_SKIP and the
- return value if SKIP_RETURN is true.
-
- Arguments from DECL_ARGUMENTS list can't be removed now, since they are
- linked by TREE_CHAIN directly. The caller is responsible for eliminating
- them when they are being duplicated (i.e. copy_arguments_for_versioning). */
-
-static tree
-build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
- bool skip_return)
-{
- tree new_decl = copy_node (orig_decl);
- tree new_type;
-
- new_type = TREE_TYPE (orig_decl);
- if (prototype_p (new_type)
- || (skip_return && !VOID_TYPE_P (TREE_TYPE (new_type))))
- new_type
- = build_function_type_skip_args (new_type, args_to_skip, skip_return);
- TREE_TYPE (new_decl) = new_type;
-
- /* For declarations setting DECL_VINDEX (i.e. methods)
- we expect first argument to be THIS pointer. */
- if (args_to_skip && bitmap_bit_p (args_to_skip, 0))
- DECL_VINDEX (new_decl) = NULL_TREE;
-
- /* When signature changes, we need to clear builtin info. */
- if (DECL_BUILT_IN (new_decl)
- && args_to_skip
- && !bitmap_empty_p (args_to_skip))
- {
- DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
- DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
- }
- /* The FE might have information and assumptions about the other
- arguments. */
- DECL_LANG_SPECIFIC (new_decl) = NULL;
- return new_decl;
-}
-
/* Create callgraph node clone with new declaration. The actual body will
be copied later at compilation stage.
@@ -453,22 +552,15 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
new_node = cgraph_clone_node (old_node, new_decl, old_node->count,
CGRAPH_FREQ_BASE, false,
- redirect_callers, false, NULL);
+ redirect_callers, false, NULL, args_to_skip);
/* Update the properties.
Make clone visible only within this translation unit. Make sure
that is not weak also.
??? We cannot use COMDAT linkage because there is no
ABI support for this. */
- DECL_EXTERNAL (new_node->decl) = 0;
if (DECL_ONE_ONLY (old_decl))
DECL_SECTION_NAME (new_node->decl) = NULL;
- DECL_COMDAT_GROUP (new_node->decl) = 0;
- TREE_PUBLIC (new_node->decl) = 0;
- DECL_COMDAT (new_node->decl) = 0;
- DECL_WEAK (new_node->decl) = 0;
- DECL_VIRTUAL_P (new_node->decl) = 0;
- DECL_STATIC_CONSTRUCTOR (new_node->decl) = 0;
- DECL_STATIC_DESTRUCTOR (new_node->decl) = 0;
+ set_new_clone_decl_and_node_flags (new_node);
new_node->clone.tree_map = tree_map;
new_node->clone.args_to_skip = args_to_skip;
@@ -508,9 +600,6 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
}
else
new_node->clone.combined_args_to_skip = args_to_skip;
- new_node->externally_visible = 0;
- new_node->local.local = 1;
- new_node->lowered = true;
cgraph_call_node_duplication_hooks (old_node, new_node);
diff --git a/gcc/common.opt b/gcc/common.opt
index 62c72f0d2fb..2259f29d19e 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1267,6 +1267,10 @@ fgnu-tm
Common Report Var(flag_tm)
Enable support for GNU transactional memory
+fgnu-unique
+Common Report Var(flag_gnu_unique) Init(1)
+Use STB_GNU_UNIQUE if supported by the assembler
+
floop-flatten
Common Ignore
Does nothing. Preserved for backward compatibility.
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 7ca47a7ec70..597e69c6e03 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -937,13 +937,13 @@ extern int arm_arch_crc;
#ifndef ARM_TARGET2_DWARF_FORMAT
#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
+#endif
/* ttype entries (the only interesting data references used)
use TARGET2 relocations. */
#define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
(((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
: DW_EH_PE_absptr)
-#endif
/* The native (Norcroft) Pascal compiler for the ARM passes the static chain
as an invisible last argument (possible since varargs don't exist in
@@ -2194,14 +2194,9 @@ extern int making_const_table;
#undef ASM_OUTPUT_BEFORE_CASE_LABEL
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) /* Empty. */
-/* Make sure subsequent insns are aligned after a TBB. */
-#define ASM_OUTPUT_CASE_END(FILE, NUM, JUMPTABLE) \
- do \
- { \
- if (GET_MODE (PATTERN (JUMPTABLE)) == QImode) \
- ASM_OUTPUT_ALIGN (FILE, 1); \
- } \
- while (0)
+#define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
+ (GET_CODE (PATTERN (prev_active_insn (LABEL))) == ADDR_DIFF_VEC \
+ ? 1 : 0)
#define ARM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do \
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 4df24a236a2..4b81ee27211 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -2784,8 +2784,8 @@
(define_insn "insv_zero"
[(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "+r")
- (match_operand:SI 1 "const_int_operand" "M")
- (match_operand:SI 2 "const_int_operand" "M"))
+ (match_operand:SI 1 "const_int_M_operand" "M")
+ (match_operand:SI 2 "const_int_M_operand" "M"))
(const_int 0))]
"arm_arch_thumb2"
"bfc%?\t%0, %2, %1"
@@ -2797,8 +2797,8 @@
(define_insn "insv_t2"
[(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "+r")
- (match_operand:SI 1 "const_int_operand" "M")
- (match_operand:SI 2 "const_int_operand" "M"))
+ (match_operand:SI 1 "const_int_M_operand" "M")
+ (match_operand:SI 2 "const_int_M_operand" "M"))
(match_operand:SI 3 "s_register_operand" "r"))]
"arm_arch_thumb2"
"bfi%?\t%0, %3, %2, %1"
@@ -4480,8 +4480,8 @@
(define_insn "*extv_reg"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(sign_extract:SI (match_operand:SI 1 "s_register_operand" "r")
- (match_operand:SI 2 "const_int_operand" "M")
- (match_operand:SI 3 "const_int_operand" "M")))]
+ (match_operand:SI 2 "const_int_M_operand" "M")
+ (match_operand:SI 3 "const_int_M_operand" "M")))]
"arm_arch_thumb2"
"sbfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
@@ -4493,8 +4493,8 @@
(define_insn "extzv_t2"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(zero_extract:SI (match_operand:SI 1 "s_register_operand" "r")
- (match_operand:SI 2 "const_int_operand" "M")
- (match_operand:SI 3 "const_int_operand" "M")))]
+ (match_operand:SI 2 "const_int_M_operand" "M")
+ (match_operand:SI 3 "const_int_M_operand" "M")))]
"arm_arch_thumb2"
"ubfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
@@ -12073,7 +12073,7 @@
[(match_parallel 0 "load_multiple_operation"
[(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:SI 3 "s_register_operand" "=rk")
(mem:SI (match_dup 1)))
])]
@@ -12102,7 +12102,7 @@
[(return)
(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:SI 3 "s_register_operand" "=rk")
(mem:SI (match_dup 1)))
])]
@@ -12155,7 +12155,7 @@
[(match_parallel 0 "pop_multiple_fp"
[(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:DF 3 "vfp_hard_register_operand" "")
(mem:DF (match_dup 1)))])]
"TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
diff --git a/gcc/config/arm/cortex-a53.md b/gcc/config/arm/cortex-a53.md
index b131c814d07..a629bd61dae 100644
--- a/gcc/config/arm/cortex-a53.md
+++ b/gcc/config/arm/cortex-a53.md
@@ -245,12 +245,12 @@
(define_insn_reservation "cortex_a53_fdivs" 14
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "fdivs, fsqrts"))
- "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 13")
+ "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 5")
(define_insn_reservation "cortex_a53_fdivd" 29
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "fdivd, fsqrtd"))
- "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 28")
+ "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 8")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ARMv8-A Cryptographic extensions.
diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
index ce5c9a830cd..6273e8820c6 100644
--- a/gcc/config/arm/predicates.md
+++ b/gcc/config/arm/predicates.md
@@ -153,6 +153,14 @@
(ior (match_operand 0 "arm_rhs_operand")
(match_operand 0 "memory_operand")))
+(define_predicate "const_int_I_operand"
+ (and (match_operand 0 "const_int_operand")
+ (match_test "satisfies_constraint_I (op)")))
+
+(define_predicate "const_int_M_operand"
+ (and (match_operand 0 "const_int_operand")
+ (match_test "satisfies_constraint_M (op)")))
+
;; This doesn't have to do much because the constant is already checked
;; in the shift_operator predicate.
(define_predicate "shift_amount_operand"
diff --git a/gcc/config/avr/avr-arch.h b/gcc/config/avr/avr-arch.h
index 6357e997cad..b3c7cc0855e 100644
--- a/gcc/config/avr/avr-arch.h
+++ b/gcc/config/avr/avr-arch.h
@@ -100,32 +100,12 @@ typedef struct
/* Index in avr_arch_types[]. */
enum avr_arch arch;
+ /* device specific feature */
+ int dev_attribute;
+
/* Must lie outside user's namespace. NULL == no macro. */
const char *const macro;
- /* Stack pointer have 8 bits width. */
- int short_sp;
-
- /* Some AVR devices have a core erratum when skipping a 2-word instruction.
- Skip instructions are: SBRC, SBRS, SBIC, SBIS, CPSE.
- Problems will occur with return address is IRQ executes during the
- skip sequence.
-
- A support ticket from Atmel returned the following information:
-
- Subject: (ATTicket:644469) On AVR skip-bug core Erratum
- From: avr@atmel.com Date: 2011-07-27
- (Please keep the subject when replying to this mail)
-
- This errata exists only in AT90S8515 and ATmega103 devices.
-
- For information please refer the following respective errata links
- http://www.atmel.com/dyn/resources/prod_documents/doc2494.pdf
- http://www.atmel.com/dyn/resources/prod_documents/doc1436.pdf */
-
- /* Core Erratum: Must not skip 2-word instruction. */
- int errata_skip;
-
/* Start of data section. */
int data_section_start;
@@ -136,6 +116,42 @@ typedef struct
const char *const library_name;
} avr_mcu_t;
+/* AVR device specific features.
+
+AVR_ISA_RMW
+ Only few avr devices have Read-Modify-Write (RMW) instructions
+ (XCH, LAC, LAS and LAT)
+
+AVR_SHORT_SP
+ Stack Pointer has only 8 bit width.
+ The device / multilib has an 8-bit stack pointer (no SPH).
+
+AVR_ERRATA_SKIP
+ Some AVR devices have a core erratum when skipping a 2-word instruction.
+ Skip instructions are: SBRC, SBRS, SBIC, SBIS, CPSE.
+ Problems will occur with return address is IRQ executes during the
+ skip sequence.
+
+ A support ticket from Atmel returned the following information:
+
+ Subject: (ATTicket:644469) On AVR skip-bug core Erratum
+ From: avr@atmel.com Date: 2011-07-27
+ (Please keep the subject when replying to this mail)
+
+ This errata exists only in AT90S8515 and ATmega103 devices.
+
+ For information please refer the following respective errata links
+ http://www.atmel.com/dyn/resources/prod_documents/doc2494.pdf
+ http://www.atmel.com/dyn/resources/prod_documents/doc1436.pdf */
+
+enum avr_device_specific_features
+{
+ AVR_ISA_NONE,
+ AVR_ISA_RMW = 0x1, /* device has RMW instructions. */
+ AVR_SHORT_SP = 0x2, /* Stack Pointer has 8 bits width. */
+ AVR_ERRATA_SKIP = 0x4 /* device has a core erratum. */
+};
+
/* Map architecture to its texinfo string. */
typedef struct
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c
index 101d28092e7..c6a2f1f9471 100644
--- a/gcc/config/avr/avr-c.c
+++ b/gcc/config/avr/avr-c.c
@@ -347,7 +347,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
if (TARGET_NO_INTERRUPTS)
cpp_define (pfile, "__NO_INTERRUPTS__");
- if (avr_current_device->errata_skip)
+ if (avr_current_device->dev_attribute & AVR_ERRATA_SKIP)
{
cpp_define (pfile, "__AVR_ERRATA_SKIP__");
@@ -355,6 +355,9 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
cpp_define (pfile, "__AVR_ERRATA_SKIP_JMP_CALL__");
}
+ if (avr_current_device->dev_attribute & AVR_ISA_RMW)
+ cpp_define (pfile, "__AVR_ISA_RMW__");
+
cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
avr_current_arch->sfr_offset);
diff --git a/gcc/config/avr/avr-devices.c b/gcc/config/avr/avr-devices.c
index 177f1961f14..2485cad65c4 100644
--- a/gcc/config/avr/avr-devices.c
+++ b/gcc/config/avr/avr-devices.c
@@ -104,11 +104,11 @@ avr_texinfo[] =
const avr_mcu_t
avr_mcu_types[] =
{
-#define AVR_MCU(NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME)\
- { NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME },
+#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBNAME)\
+ { NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBNAME },
#include "avr-mcus.def"
#undef AVR_MCU
/* End of list. */
- { NULL, ARCH_UNKNOWN, NULL, 0, 0, 0, 0, NULL }
+ { NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, NULL }
};
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index d068f5e8017..3cf2fcd4194 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -33,291 +33,288 @@
Before including this file, define a macro:
- AVR_MCU (NAME, ARCH, MACRO, SHORT_SP, ERRATA_SKIP, DATA_SEC, N_FLASH,
- LIBRARY_NAME)
+ AVR_MCU (NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBRARY_NAME)
where the arguments are the fields of avr_mcu_t:
- NAME Accept -mmcu=<NAME>
+ NAME Accept -mmcu=<NAME>
- ARCH Specifies the multilib variant together with SHORT_SP
+ ARCH Specifies the multilib variant together with SHORT_SP
- MACRO If NULL, this is a core and not a device. If non-NULL,
- supply respective built-in macro.
+ DEV_ATTRIBUTE Specifies the device specific features
+ - additional ISA, short SP, errata skip etc.,
- SHORT_SP The device / multilib has an 8-bit stack pointer (no SPH).
+ MACRO If NULL, this is a core and not a device. If non-NULL,
+ supply respective built-in macro.
- ERRATA_SKIP Apply work-around for the "skip 32-bit instruction"
- silicon bug: Don't skip 32-bit instrctions.
+ DATA_SEC First address of SRAM, used in -Tdata= by the driver.
- DATA_SEC First address of SRAM, used in -Tdata= by the driver.
+ N_FLASH Number of 64 KiB flash segments, rounded up.
- N_FLASH Number of 64 KiB flash segments, rounded up.
-
- LIBRARY_NAME Used by the driver to linke startup code from avr-libc
- as of crt<LIBRARY_NAME>.o
+ LIBRARY_NAME Used by the driver to linke startup code from avr-libc
+ as of crt<LIBRARY_NAME>.o
"avr2" must be first for the "0" default to work as intended. */
/* Classic, <= 8K. */
-AVR_MCU ("avr2", ARCH_AVR2, NULL, 0, 1, 0x0060, 6, "s8515")
-AVR_MCU ("at90s2313", ARCH_AVR2, "__AVR_AT90S2313__", 1, 0, 0x0060, 1, "s2313")
-AVR_MCU ("at90s2323", ARCH_AVR2, "__AVR_AT90S2323__", 1, 0, 0x0060, 1, "s2323")
-AVR_MCU ("at90s2333", ARCH_AVR2, "__AVR_AT90S2333__", 1, 0, 0x0060, 1, "s2333")
-AVR_MCU ("at90s2343", ARCH_AVR2, "__AVR_AT90S2343__", 1, 0, 0x0060, 1, "s2343")
-AVR_MCU ("attiny22", ARCH_AVR2, "__AVR_ATtiny22__", 1, 0, 0x0060, 1, "tn22")
-AVR_MCU ("attiny26", ARCH_AVR2, "__AVR_ATtiny26__", 1, 0, 0x0060, 1, "tn26")
-AVR_MCU ("at90s4414", ARCH_AVR2, "__AVR_AT90S4414__", 0, 0, 0x0060, 1, "s4414")
-AVR_MCU ("at90s4433", ARCH_AVR2, "__AVR_AT90S4433__", 1, 0, 0x0060, 1, "s4433")
-AVR_MCU ("at90s4434", ARCH_AVR2, "__AVR_AT90S4434__", 0, 0, 0x0060, 1, "s4434")
-AVR_MCU ("at90s8515", ARCH_AVR2, "__AVR_AT90S8515__", 0, 1, 0x0060, 1, "s8515")
-AVR_MCU ("at90c8534", ARCH_AVR2, "__AVR_AT90C8534__", 0, 0, 0x0060, 1, "c8534")
-AVR_MCU ("at90s8535", ARCH_AVR2, "__AVR_AT90S8535__", 0, 0, 0x0060, 1, "s8535")
+AVR_MCU ("avr2", ARCH_AVR2, AVR_ERRATA_SKIP, NULL, 0x0060, 6, "s8515")
+AVR_MCU ("at90s2313", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2313__", 0x0060, 1, "s2313")
+AVR_MCU ("at90s2323", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2323__", 0x0060, 1, "s2323")
+AVR_MCU ("at90s2333", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2333__", 0x0060, 1, "s2333")
+AVR_MCU ("at90s2343", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2343__", 0x0060, 1, "s2343")
+AVR_MCU ("attiny22", ARCH_AVR2, AVR_SHORT_SP, "__AVR_ATtiny22__", 0x0060, 1, "tn22")
+AVR_MCU ("attiny26", ARCH_AVR2, AVR_SHORT_SP, "__AVR_ATtiny26__", 0x0060, 1, "tn26")
+AVR_MCU ("at90s4414", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S4414__", 0x0060, 1, "s4414")
+AVR_MCU ("at90s4433", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S4433__", 0x0060, 1, "s4433")
+AVR_MCU ("at90s4434", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S4434__", 0x0060, 1, "s4434")
+AVR_MCU ("at90s8515", ARCH_AVR2, AVR_ERRATA_SKIP, "__AVR_AT90S8515__", 0x0060, 1, "s8515")
+AVR_MCU ("at90c8534", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90C8534__", 0x0060, 1, "c8534")
+AVR_MCU ("at90s8535", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S8535__", 0x0060, 1, "s8535")
/* Classic + MOVW, <= 8K. */
-AVR_MCU ("avr25", ARCH_AVR25, NULL, 0, 0, 0x0060, 1, "tn85")
-AVR_MCU ("ata6289", ARCH_AVR25, "__AVR_ATA6289__", 0, 0, 0x0100, 1, "a6289")
-AVR_MCU ("ata5272", ARCH_AVR25, "__AVR_ATA5272__", 0, 0, 0x0100, 1, "a5272")
-AVR_MCU ("attiny13", ARCH_AVR25, "__AVR_ATtiny13__", 1, 0, 0x0060, 1, "tn13")
-AVR_MCU ("attiny13a", ARCH_AVR25, "__AVR_ATtiny13A__", 1, 0, 0x0060, 1, "tn13a")
-AVR_MCU ("attiny2313", ARCH_AVR25, "__AVR_ATtiny2313__", 1, 0, 0x0060, 1, "tn2313")
-AVR_MCU ("attiny2313a", ARCH_AVR25, "__AVR_ATtiny2313A__", 1, 0, 0x0060, 1, "tn2313a")
-AVR_MCU ("attiny24", ARCH_AVR25, "__AVR_ATtiny24__", 1, 0, 0x0060, 1, "tn24")
-AVR_MCU ("attiny24a", ARCH_AVR25, "__AVR_ATtiny24A__", 1, 0, 0x0060, 1, "tn24a")
-AVR_MCU ("attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 0, 0, 0x0060, 1, "tn4313")
-AVR_MCU ("attiny44", ARCH_AVR25, "__AVR_ATtiny44__", 0, 0, 0x0060, 1, "tn44")
-AVR_MCU ("attiny44a", ARCH_AVR25, "__AVR_ATtiny44A__", 0, 0, 0x0060, 1, "tn44a")
-AVR_MCU ("attiny84", ARCH_AVR25, "__AVR_ATtiny84__", 0, 0, 0x0060, 1, "tn84")
-AVR_MCU ("attiny84a", ARCH_AVR25, "__AVR_ATtiny84A__", 0, 0, 0x0060, 1, "tn84")
-AVR_MCU ("attiny25", ARCH_AVR25, "__AVR_ATtiny25__", 1, 0, 0x0060, 1, "tn25")
-AVR_MCU ("attiny45", ARCH_AVR25, "__AVR_ATtiny45__", 0, 0, 0x0060, 1, "tn45")
-AVR_MCU ("attiny85", ARCH_AVR25, "__AVR_ATtiny85__", 0, 0, 0x0060, 1, "tn85")
-AVR_MCU ("attiny261", ARCH_AVR25, "__AVR_ATtiny261__", 1, 0, 0x0060, 1, "tn261")
-AVR_MCU ("attiny261a", ARCH_AVR25, "__AVR_ATtiny261A__", 1, 0, 0x0060, 1, "tn261a")
-AVR_MCU ("attiny461", ARCH_AVR25, "__AVR_ATtiny461__", 0, 0, 0x0060, 1, "tn461")
-AVR_MCU ("attiny461a", ARCH_AVR25, "__AVR_ATtiny461A__", 0, 0, 0x0060, 1, "tn461a")
-AVR_MCU ("attiny861", ARCH_AVR25, "__AVR_ATtiny861__", 0, 0, 0x0060, 1, "tn861")
-AVR_MCU ("attiny861a", ARCH_AVR25, "__AVR_ATtiny861A__", 0, 0, 0x0060, 1, "tn861a")
-AVR_MCU ("attiny43u", ARCH_AVR25, "__AVR_ATtiny43U__", 0, 0, 0x0060, 1, "tn43u")
-AVR_MCU ("attiny87", ARCH_AVR25, "__AVR_ATtiny87__", 0, 0, 0x0100, 1, "tn87")
-AVR_MCU ("attiny48", ARCH_AVR25, "__AVR_ATtiny48__", 0, 0, 0x0100, 1, "tn48")
-AVR_MCU ("attiny88", ARCH_AVR25, "__AVR_ATtiny88__", 0, 0, 0x0100, 1, "tn88")
-AVR_MCU ("at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 0, 0, 0x0060, 1, "86401")
+AVR_MCU ("avr25", ARCH_AVR25, AVR_ISA_NONE, NULL, 0x0060, 1, "tn85")
+AVR_MCU ("ata6289", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATA6289__", 0x0100, 1, "a6289")
+AVR_MCU ("ata5272", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATA5272__", 0x0100, 1, "a5272")
+AVR_MCU ("attiny13", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny13__", 0x0060, 1, "tn13")
+AVR_MCU ("attiny13a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny13A__", 0x0060, 1, "tn13a")
+AVR_MCU ("attiny2313", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny2313__", 0x0060, 1, "tn2313")
+AVR_MCU ("attiny2313a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny2313A__", 0x0060, 1, "tn2313a")
+AVR_MCU ("attiny24", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny24__", 0x0060, 1, "tn24")
+AVR_MCU ("attiny24a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny24A__", 0x0060, 1, "tn24a")
+AVR_MCU ("attiny4313", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny4313__", 0x0060, 1, "tn4313")
+AVR_MCU ("attiny44", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny44__", 0x0060, 1, "tn44")
+AVR_MCU ("attiny44a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny44A__", 0x0060, 1, "tn44a")
+AVR_MCU ("attiny84", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny84__", 0x0060, 1, "tn84")
+AVR_MCU ("attiny84a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny84A__", 0x0060, 1, "tn84")
+AVR_MCU ("attiny25", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny25__", 0x0060, 1, "tn25")
+AVR_MCU ("attiny45", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny45__", 0x0060, 1, "tn45")
+AVR_MCU ("attiny85", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny85__", 0x0060, 1, "tn85")
+AVR_MCU ("attiny261", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny261__", 0x0060, 1, "tn261")
+AVR_MCU ("attiny261a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny261A__", 0x0060, 1, "tn261a")
+AVR_MCU ("attiny461", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny461__", 0x0060, 1, "tn461")
+AVR_MCU ("attiny461a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny461A__", 0x0060, 1, "tn461a")
+AVR_MCU ("attiny861", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny861__", 0x0060, 1, "tn861")
+AVR_MCU ("attiny861a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny861A__", 0x0060, 1, "tn861a")
+AVR_MCU ("attiny43u", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny43U__", 0x0060, 1, "tn43u")
+AVR_MCU ("attiny87", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny87__", 0x0100, 1, "tn87")
+AVR_MCU ("attiny48", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny48__", 0x0100, 1, "tn48")
+AVR_MCU ("attiny88", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny88__", 0x0100, 1, "tn88")
+AVR_MCU ("at86rf401", ARCH_AVR25, AVR_ISA_NONE, "__AVR_AT86RF401__", 0x0060, 1, "86401")
/* Classic, > 8K, <= 64K. */
-AVR_MCU ("avr3", ARCH_AVR3, NULL, 0, 0, 0x0060, 1, "43355")
-AVR_MCU ("at43usb355", ARCH_AVR3, "__AVR_AT43USB355__", 0, 0, 0x0060, 1, "43355")
-AVR_MCU ("at76c711", ARCH_AVR3, "__AVR_AT76C711__", 0, 0, 0x0060, 1, "76711")
+AVR_MCU ("avr3", ARCH_AVR3, AVR_ISA_NONE, NULL, 0x0060, 1, "43355")
+AVR_MCU ("at43usb355", ARCH_AVR3, AVR_ISA_NONE, "__AVR_AT43USB355__", 0x0060, 1, "43355")
+AVR_MCU ("at76c711", ARCH_AVR3, AVR_ISA_NONE, "__AVR_AT76C711__", 0x0060, 1, "76711")
/* Classic, == 128K. */
-AVR_MCU ("avr31", ARCH_AVR31, NULL, 0, 1, 0x0060, 2, "m103")
-AVR_MCU ("atmega103", ARCH_AVR31, "__AVR_ATmega103__", 0, 1, 0x0060, 2, "m103")
-AVR_MCU ("at43usb320", ARCH_AVR31, "__AVR_AT43USB320__", 0, 0, 0x0060, 2, "43320")
+AVR_MCU ("avr31", ARCH_AVR31, AVR_ERRATA_SKIP, NULL, 0x0060, 2, "m103")
+AVR_MCU ("atmega103", ARCH_AVR31, AVR_ERRATA_SKIP, "__AVR_ATmega103__", 0x0060, 2, "m103")
+AVR_MCU ("at43usb320", ARCH_AVR31, AVR_ISA_NONE, "__AVR_AT43USB320__", 0x0060, 2, "43320")
/* Classic + MOVW + JMP/CALL. */
-AVR_MCU ("avr35", ARCH_AVR35, NULL, 0, 0, 0x0100, 1, "usb162")
-AVR_MCU ("ata5505", ARCH_AVR35, "__AVR_ATA5505__", 0, 0, 0x0100, 1, "a5505")
-AVR_MCU ("at90usb82", ARCH_AVR35, "__AVR_AT90USB82__", 0, 0, 0x0100, 1, "usb82")
-AVR_MCU ("at90usb162", ARCH_AVR35, "__AVR_AT90USB162__", 0, 0, 0x0100, 1, "usb162")
-AVR_MCU ("atmega8u2", ARCH_AVR35, "__AVR_ATmega8U2__", 0, 0, 0x0100, 1, "m8u2")
-AVR_MCU ("atmega16u2", ARCH_AVR35, "__AVR_ATmega16U2__", 0, 0, 0x0100, 1, "m16u2")
-AVR_MCU ("atmega32u2", ARCH_AVR35, "__AVR_ATmega32U2__", 0, 0, 0x0100, 1, "m32u2")
-AVR_MCU ("attiny167", ARCH_AVR35, "__AVR_ATtiny167__", 0, 0, 0x0100, 1, "tn167")
-AVR_MCU ("attiny1634", ARCH_AVR35, "__AVR_ATtiny1634__", 0, 0, 0x0100, 1, "tn1634")
+AVR_MCU ("avr35", ARCH_AVR35, AVR_ISA_NONE, NULL, 0x0100, 1, "usb162")
+AVR_MCU ("ata5505", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATA5505__", 0x0100, 1, "a5505")
+AVR_MCU ("at90usb82", ARCH_AVR35, AVR_ISA_NONE, "__AVR_AT90USB82__", 0x0100, 1, "usb82")
+AVR_MCU ("at90usb162", ARCH_AVR35, AVR_ISA_NONE, "__AVR_AT90USB162__", 0x0100, 1, "usb162")
+AVR_MCU ("atmega8u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega8U2__", 0x0100, 1, "m8u2")
+AVR_MCU ("atmega16u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega16U2__", 0x0100, 1, "m16u2")
+AVR_MCU ("atmega32u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega32U2__", 0x0100, 1, "m32u2")
+AVR_MCU ("attiny167", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATtiny167__", 0x0100, 1, "tn167")
+AVR_MCU ("attiny1634", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATtiny1634__", 0x0100, 1, "tn1634")
/* Enhanced, <= 8K. */
-AVR_MCU ("avr4", ARCH_AVR4, NULL, 0, 0, 0x0060, 1, "m8")
-AVR_MCU ("ata6285", ARCH_AVR4, "__AVR_ATA6285__", 0, 0, 0x0100, 1, "a6285")
-AVR_MCU ("ata6286", ARCH_AVR4, "__AVR_ATA6286__", 0, 0, 0x0100, 1, "a6286")
-AVR_MCU ("atmega8", ARCH_AVR4, "__AVR_ATmega8__", 0, 0, 0x0060, 1, "m8")
-AVR_MCU ("atmega8a", ARCH_AVR4, "__AVR_ATmega8A__", 0, 0, 0x0060, 1, "m8a")
-AVR_MCU ("atmega48", ARCH_AVR4, "__AVR_ATmega48__", 0, 0, 0x0100, 1, "m48")
-AVR_MCU ("atmega48a", ARCH_AVR4, "__AVR_ATmega48A__", 0, 0, 0x0100, 1, "m48a")
-AVR_MCU ("atmega48p", ARCH_AVR4, "__AVR_ATmega48P__", 0, 0, 0x0100, 1, "m48p")
-AVR_MCU ("atmega48pa", ARCH_AVR4, "__AVR_ATmega48PA__", 0, 0, 0x0100, 1, "m48pa")
-AVR_MCU ("atmega88", ARCH_AVR4, "__AVR_ATmega88__", 0, 0, 0x0100, 1, "m88")
-AVR_MCU ("atmega88a", ARCH_AVR4, "__AVR_ATmega88A__", 0, 0, 0x0100, 1, "m88a")
-AVR_MCU ("atmega88p", ARCH_AVR4, "__AVR_ATmega88P__", 0, 0, 0x0100, 1, "m88p")
-AVR_MCU ("atmega88pa", ARCH_AVR4, "__AVR_ATmega88PA__", 0, 0, 0x0100, 1, "m88pa")
-AVR_MCU ("atmega8515", ARCH_AVR4, "__AVR_ATmega8515__", 0, 0, 0x0060, 1, "m8515")
-AVR_MCU ("atmega8535", ARCH_AVR4, "__AVR_ATmega8535__", 0, 0, 0x0060, 1, "m8535")
-AVR_MCU ("atmega8hva", ARCH_AVR4, "__AVR_ATmega8HVA__", 0, 0, 0x0100, 1, "m8hva")
-AVR_MCU ("at90pwm1", ARCH_AVR4, "__AVR_AT90PWM1__", 0, 0, 0x0100, 1, "90pwm1")
-AVR_MCU ("at90pwm2", ARCH_AVR4, "__AVR_AT90PWM2__", 0, 0, 0x0100, 1, "90pwm2")
-AVR_MCU ("at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__", 0, 0, 0x0100, 1, "90pwm2b")
-AVR_MCU ("at90pwm3", ARCH_AVR4, "__AVR_AT90PWM3__", 0, 0, 0x0100, 1, "90pwm3")
-AVR_MCU ("at90pwm3b", ARCH_AVR4, "__AVR_AT90PWM3B__", 0, 0, 0x0100, 1, "90pwm3b")
-AVR_MCU ("at90pwm81", ARCH_AVR4, "__AVR_AT90PWM81__", 0, 0, 0x0100, 1, "90pwm81")
+AVR_MCU ("avr4", ARCH_AVR4, AVR_ISA_NONE, NULL, 0x0060, 1, "m8")
+AVR_MCU ("ata6285", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATA6285__", 0x0100, 1, "a6285")
+AVR_MCU ("ata6286", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATA6286__", 0x0100, 1, "a6286")
+AVR_MCU ("atmega8", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8__", 0x0060, 1, "m8")
+AVR_MCU ("atmega8a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8A__", 0x0060, 1, "m8a")
+AVR_MCU ("atmega48", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48__", 0x0100, 1, "m48")
+AVR_MCU ("atmega48a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48A__", 0x0100, 1, "m48a")
+AVR_MCU ("atmega48p", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48P__", 0x0100, 1, "m48p")
+AVR_MCU ("atmega48pa", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48PA__", 0x0100, 1, "m48pa")
+AVR_MCU ("atmega88", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88__", 0x0100, 1, "m88")
+AVR_MCU ("atmega88a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88A__", 0x0100, 1, "m88a")
+AVR_MCU ("atmega88p", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88P__", 0x0100, 1, "m88p")
+AVR_MCU ("atmega88pa", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88PA__", 0x0100, 1, "m88pa")
+AVR_MCU ("atmega8515", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8515__", 0x0060, 1, "m8515")
+AVR_MCU ("atmega8535", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8535__", 0x0060, 1, "m8535")
+AVR_MCU ("atmega8hva", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8HVA__", 0x0100, 1, "m8hva")
+AVR_MCU ("at90pwm1", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM1__", 0x0100, 1, "90pwm1")
+AVR_MCU ("at90pwm2", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM2__", 0x0100, 1, "90pwm2")
+AVR_MCU ("at90pwm2b", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM2B__", 0x0100, 1, "90pwm2b")
+AVR_MCU ("at90pwm3", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM3__", 0x0100, 1, "90pwm3")
+AVR_MCU ("at90pwm3b", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM3B__", 0x0100, 1, "90pwm3b")
+AVR_MCU ("at90pwm81", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM81__", 0x0100, 1, "90pwm81")
/* Enhanced, > 8K, <= 64K. */
-AVR_MCU ("avr5", ARCH_AVR5, NULL, 0, 0, 0x0060, 1, "m16")
-AVR_MCU ("ata5790", ARCH_AVR5, "__AVR_ATA5790__", 0, 0, 0x0100, 1, "a5790")
-AVR_MCU ("ata5790n", ARCH_AVR5, "__AVR_ATA5790N__", 0, 0, 0x0100, 1, "a5790n")
-AVR_MCU ("ata5795", ARCH_AVR5, "__AVR_ATA5795__", 0, 0, 0x0100, 1, "a5795")
-AVR_MCU ("atmega16", ARCH_AVR5, "__AVR_ATmega16__", 0, 0, 0x0060, 1, "m16")
-AVR_MCU ("atmega16a", ARCH_AVR5, "__AVR_ATmega16A__", 0, 0, 0x0060, 1, "m16a")
-AVR_MCU ("atmega161", ARCH_AVR5, "__AVR_ATmega161__", 0, 0, 0x0060, 1, "m161")
-AVR_MCU ("atmega162", ARCH_AVR5, "__AVR_ATmega162__", 0, 0, 0x0100, 1, "m162")
-AVR_MCU ("atmega163", ARCH_AVR5, "__AVR_ATmega163__", 0, 0, 0x0060, 1, "m163")
-AVR_MCU ("atmega164a", ARCH_AVR5, "__AVR_ATmega164A__", 0, 0, 0x0100, 1, "m164a")
-AVR_MCU ("atmega164p", ARCH_AVR5, "__AVR_ATmega164P__", 0, 0, 0x0100, 1, "m164p")
-AVR_MCU ("atmega164pa", ARCH_AVR5, "__AVR_ATmega164PA__", 0, 0, 0x0100, 1, "m164pa")
-AVR_MCU ("atmega165", ARCH_AVR5, "__AVR_ATmega165__", 0, 0, 0x0100, 1, "m165")
-AVR_MCU ("atmega165a", ARCH_AVR5, "__AVR_ATmega165A__", 0, 0, 0x0100, 1, "m165a")
-AVR_MCU ("atmega165p", ARCH_AVR5, "__AVR_ATmega165P__", 0, 0, 0x0100, 1, "m165p")
-AVR_MCU ("atmega165pa", ARCH_AVR5, "__AVR_ATmega165PA__", 0, 0, 0x0100, 1, "m165pa")
-AVR_MCU ("atmega168", ARCH_AVR5, "__AVR_ATmega168__", 0, 0, 0x0100, 1, "m168")
-AVR_MCU ("atmega168a", ARCH_AVR5, "__AVR_ATmega168A__", 0, 0, 0x0100, 1, "m168a")
-AVR_MCU ("atmega168p", ARCH_AVR5, "__AVR_ATmega168P__", 0, 0, 0x0100, 1, "m168p")
-AVR_MCU ("atmega168pa", ARCH_AVR5, "__AVR_ATmega168PA__", 0, 0, 0x0100, 1, "m168pa")
-AVR_MCU ("atmega169", ARCH_AVR5, "__AVR_ATmega169__", 0, 0, 0x0100, 1, "m169")
-AVR_MCU ("atmega169a", ARCH_AVR5, "__AVR_ATmega169A__", 0, 0, 0x0100, 1, "m169a")
-AVR_MCU ("atmega169p", ARCH_AVR5, "__AVR_ATmega169P__", 0, 0, 0x0100, 1, "m169p")
-AVR_MCU ("atmega169pa", ARCH_AVR5, "__AVR_ATmega169PA__", 0, 0, 0x0100, 1, "m169pa")
-AVR_MCU ("atmega16hvb", ARCH_AVR5, "__AVR_ATmega16HVB__", 0, 0, 0x0100, 1, "m16hvb")
-AVR_MCU ("atmega16hvbrevb", ARCH_AVR5, "__AVR_ATmega16HVBREVB__", 0, 0, 0x0100, 1, "m16hvbrevb")
-AVR_MCU ("atmega16m1", ARCH_AVR5, "__AVR_ATmega16M1__", 0, 0, 0x0100, 1, "m16m1")
-AVR_MCU ("atmega16u4", ARCH_AVR5, "__AVR_ATmega16U4__", 0, 0, 0x0100, 1, "m16u4")
-AVR_MCU ("atmega26hvg", ARCH_AVR5, "__AVR_ATmega26HVG__", 0, 0, 0x0100, 1, "m26hvg")
-AVR_MCU ("atmega32a", ARCH_AVR5, "__AVR_ATmega32A__", 0, 0, 0x0060, 1, "m32a")
-AVR_MCU ("atmega32", ARCH_AVR5, "__AVR_ATmega32__", 0, 0, 0x0060, 1, "m32")
-AVR_MCU ("atmega323", ARCH_AVR5, "__AVR_ATmega323__", 0, 0, 0x0060, 1, "m323")
-AVR_MCU ("atmega324a", ARCH_AVR5, "__AVR_ATmega324A__", 0, 0, 0x0100, 1, "m324a")
-AVR_MCU ("atmega324p", ARCH_AVR5, "__AVR_ATmega324P__", 0, 0, 0x0100, 1, "m324p")
-AVR_MCU ("atmega324pa", ARCH_AVR5, "__AVR_ATmega324PA__", 0, 0, 0x0100, 1, "m324pa")
-AVR_MCU ("atmega325", ARCH_AVR5, "__AVR_ATmega325__", 0, 0, 0x0100, 1, "m325")
-AVR_MCU ("atmega325a", ARCH_AVR5, "__AVR_ATmega325A__", 0, 0, 0x0100, 1, "m325a")
-AVR_MCU ("atmega325p", ARCH_AVR5, "__AVR_ATmega325P__", 0, 0, 0x0100, 1, "m325p")
-AVR_MCU ("atmega3250", ARCH_AVR5, "__AVR_ATmega3250__", 0, 0, 0x0100, 1, "m3250")
-AVR_MCU ("atmega3250a", ARCH_AVR5, "__AVR_ATmega3250A__", 0, 0, 0x0100, 1, "m3250a")
-AVR_MCU ("atmega3250p", ARCH_AVR5, "__AVR_ATmega3250P__", 0, 0, 0x0100, 1, "m3250p")
-AVR_MCU ("atmega3250pa", ARCH_AVR5, "__AVR_ATmega3250PA__", 0, 0, 0x0100, 1, "m3250pa")
-AVR_MCU ("atmega328", ARCH_AVR5, "__AVR_ATmega328__", 0, 0, 0x0100, 1, "m328")
-AVR_MCU ("atmega328p", ARCH_AVR5, "__AVR_ATmega328P__", 0, 0, 0x0100, 1, "m328p")
-AVR_MCU ("atmega329", ARCH_AVR5, "__AVR_ATmega329__", 0, 0, 0x0100, 1, "m329")
-AVR_MCU ("atmega329a", ARCH_AVR5, "__AVR_ATmega329A__", 0, 0, 0x0100, 1, "m329a")
-AVR_MCU ("atmega329p", ARCH_AVR5, "__AVR_ATmega329P__", 0, 0, 0x0100, 1, "m329p")
-AVR_MCU ("atmega329pa", ARCH_AVR5, "__AVR_ATmega329PA__", 0, 0, 0x0100, 1, "m329pa")
-AVR_MCU ("atmega3290", ARCH_AVR5, "__AVR_ATmega3290__", 0, 0, 0x0100, 1, "m3290")
-AVR_MCU ("atmega3290a", ARCH_AVR5, "__AVR_ATmega3290A__", 0, 0, 0x0100, 1, "m3290a")
-AVR_MCU ("atmega3290p", ARCH_AVR5, "__AVR_ATmega3290P__", 0, 0, 0x0100, 1, "m3290p")
-AVR_MCU ("atmega3290pa", ARCH_AVR5, "__AVR_ATmega3290PA__", 0, 0, 0x0100, 1, "m3290pa")
-AVR_MCU ("atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__", 0, 0, 0x0100, 1, "m32c1")
-AVR_MCU ("atmega32m1", ARCH_AVR5, "__AVR_ATmega32M1__", 0, 0, 0x0100, 1, "m32m1")
-AVR_MCU ("atmega32u4", ARCH_AVR5, "__AVR_ATmega32U4__", 0, 0, 0x0100, 1, "m32u4")
-AVR_MCU ("atmega32u6", ARCH_AVR5, "__AVR_ATmega32U6__", 0, 0, 0x0100, 1, "m32u6")
-AVR_MCU ("atmega406", ARCH_AVR5, "__AVR_ATmega406__", 0, 0, 0x0100, 1, "m406")
-AVR_MCU ("atmega64", ARCH_AVR5, "__AVR_ATmega64__", 0, 0, 0x0100, 1, "m64")
-AVR_MCU ("atmega64a", ARCH_AVR5, "__AVR_ATmega64A__", 0, 0, 0x0100, 1, "m64a")
-AVR_MCU ("atmega640", ARCH_AVR5, "__AVR_ATmega640__", 0, 0, 0x0200, 1, "m640")
-AVR_MCU ("atmega644", ARCH_AVR5, "__AVR_ATmega644__", 0, 0, 0x0100, 1, "m644")
-AVR_MCU ("atmega644a", ARCH_AVR5, "__AVR_ATmega644A__", 0, 0, 0x0100, 1, "m644a")
-AVR_MCU ("atmega644p", ARCH_AVR5, "__AVR_ATmega644P__", 0, 0, 0x0100, 1, "m644p")
-AVR_MCU ("atmega644pa", ARCH_AVR5, "__AVR_ATmega644PA__", 0, 0, 0x0100, 1, "m644pa")
-AVR_MCU ("atmega645", ARCH_AVR5, "__AVR_ATmega645__", 0, 0, 0x0100, 1, "m645")
-AVR_MCU ("atmega645a", ARCH_AVR5, "__AVR_ATmega645A__", 0, 0, 0x0100, 1, "m645a")
-AVR_MCU ("atmega645p", ARCH_AVR5, "__AVR_ATmega645P__", 0, 0, 0x0100, 1, "m645p")
-AVR_MCU ("atmega6450", ARCH_AVR5, "__AVR_ATmega6450__", 0, 0, 0x0100, 1, "m6450")
-AVR_MCU ("atmega6450a", ARCH_AVR5, "__AVR_ATmega6450A__", 0, 0, 0x0100, 1, "m6450a")
-AVR_MCU ("atmega6450p", ARCH_AVR5, "__AVR_ATmega6450P__", 0, 0, 0x0100, 1, "m6450p")
-AVR_MCU ("atmega649", ARCH_AVR5, "__AVR_ATmega649__", 0, 0, 0x0100, 1, "m649")
-AVR_MCU ("atmega649a", ARCH_AVR5, "__AVR_ATmega649A__", 0, 0, 0x0100, 1, "m649a")
-AVR_MCU ("atmega649p", ARCH_AVR5, "__AVR_ATmega649P__", 0, 0, 0x0100, 1, "m649p")
-AVR_MCU ("atmega6490", ARCH_AVR5, "__AVR_ATmega6490__", 0, 0, 0x0100, 1, "m6490")
-AVR_MCU ("atmega16hva", ARCH_AVR5, "__AVR_ATmega16HVA__", 0, 0, 0x0100, 1, "m16hva")
-AVR_MCU ("atmega16hva2", ARCH_AVR5, "__AVR_ATmega16HVA2__", 0, 0, 0x0100, 1, "m16hva2")
-AVR_MCU ("atmega32hvb", ARCH_AVR5, "__AVR_ATmega32HVB__", 0, 0, 0x0100, 1, "m32hvb")
-AVR_MCU ("atmega6490a", ARCH_AVR5, "__AVR_ATmega6490A__", 0, 0, 0x0100, 1, "m6490a")
-AVR_MCU ("atmega6490p", ARCH_AVR5, "__AVR_ATmega6490P__", 0, 0, 0x0100, 1, "m6490p")
-AVR_MCU ("atmega64c1", ARCH_AVR5, "__AVR_ATmega64C1__", 0, 0, 0x0100, 1, "m64c1")
-AVR_MCU ("atmega64m1", ARCH_AVR5, "__AVR_ATmega64M1__", 0, 0, 0x0100, 1, "m64m1")
-AVR_MCU ("atmega64hve", ARCH_AVR5, "__AVR_ATmega64HVE__", 0, 0, 0x0100, 1, "m64hve")
-AVR_MCU ("atmega64rfa2", ARCH_AVR5, "__AVR_ATmega64RFA2__", 0, 0, 0x0200, 1, "m64rfa2")
-AVR_MCU ("atmega64rfr2", ARCH_AVR5, "__AVR_ATmega64RFR2__", 0, 0, 0x0200, 1, "m64rfr2")
-AVR_MCU ("atmega32hvbrevb", ARCH_AVR5, "__AVR_ATmega32HVBREVB__", 0, 0, 0x0100, 1, "m32hvbrevb")
-AVR_MCU ("atmega48hvf", ARCH_AVR5, "__AVR_ATmega48HVF__", 0, 0, 0x0100, 1, "m48hvf")
-AVR_MCU ("at90can32", ARCH_AVR5, "__AVR_AT90CAN32__", 0, 0, 0x0100, 1, "can32")
-AVR_MCU ("at90can64", ARCH_AVR5, "__AVR_AT90CAN64__", 0, 0, 0x0100, 1, "can64")
-AVR_MCU ("at90pwm161", ARCH_AVR5, "__AVR_AT90PWM161__", 0, 0, 0x0100, 1, "90pwm161")
-AVR_MCU ("at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__", 0, 0, 0x0100, 1, "90pwm216")
-AVR_MCU ("at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__", 0, 0, 0x0100, 1, "90pwm316")
-AVR_MCU ("at90scr100", ARCH_AVR5, "__AVR_AT90SCR100__", 0, 0, 0x0100, 1, "90scr100")
-AVR_MCU ("at90usb646", ARCH_AVR5, "__AVR_AT90USB646__", 0, 0, 0x0100, 1, "usb646")
-AVR_MCU ("at90usb647", ARCH_AVR5, "__AVR_AT90USB647__", 0, 0, 0x0100, 1, "usb647")
-AVR_MCU ("at94k", ARCH_AVR5, "__AVR_AT94K__", 0, 0, 0x0060, 1, "at94k")
-AVR_MCU ("m3000", ARCH_AVR5, "__AVR_M3000__", 0, 0, 0x1000, 1, "m3000")
+AVR_MCU ("avr5", ARCH_AVR5, AVR_ISA_NONE, NULL, 0x0060, 1, "m16")
+AVR_MCU ("ata5790", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5790__", 0x0100, 1, "a5790")
+AVR_MCU ("ata5790n", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5790N__", 0x0100, 1, "a5790n")
+AVR_MCU ("ata5795", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5795__", 0x0100, 1, "a5795")
+AVR_MCU ("atmega16", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16__", 0x0060, 1, "m16")
+AVR_MCU ("atmega16a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16A__", 0x0060, 1, "m16a")
+AVR_MCU ("atmega161", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega161__", 0x0060, 1, "m161")
+AVR_MCU ("atmega162", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega162__", 0x0100, 1, "m162")
+AVR_MCU ("atmega163", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega163__", 0x0060, 1, "m163")
+AVR_MCU ("atmega164a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164A__", 0x0100, 1, "m164a")
+AVR_MCU ("atmega164p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164P__", 0x0100, 1, "m164p")
+AVR_MCU ("atmega164pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164PA__", 0x0100, 1, "m164pa")
+AVR_MCU ("atmega165", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165__", 0x0100, 1, "m165")
+AVR_MCU ("atmega165a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165A__", 0x0100, 1, "m165a")
+AVR_MCU ("atmega165p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165P__", 0x0100, 1, "m165p")
+AVR_MCU ("atmega165pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165PA__", 0x0100, 1, "m165pa")
+AVR_MCU ("atmega168", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168__", 0x0100, 1, "m168")
+AVR_MCU ("atmega168a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168A__", 0x0100, 1, "m168a")
+AVR_MCU ("atmega168p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168P__", 0x0100, 1, "m168p")
+AVR_MCU ("atmega168pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168PA__", 0x0100, 1, "m168pa")
+AVR_MCU ("atmega169", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169__", 0x0100, 1, "m169")
+AVR_MCU ("atmega169a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169A__", 0x0100, 1, "m169a")
+AVR_MCU ("atmega169p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169P__", 0x0100, 1, "m169p")
+AVR_MCU ("atmega169pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169PA__", 0x0100, 1, "m169pa")
+AVR_MCU ("atmega16hvb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVB__", 0x0100, 1, "m16hvb")
+AVR_MCU ("atmega16hvbrevb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVBREVB__", 0x0100, 1, "m16hvbrevb")
+AVR_MCU ("atmega16m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16M1__", 0x0100, 1, "m16m1")
+AVR_MCU ("atmega16u4", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16U4__", 0x0100, 1, "m16u4")
+AVR_MCU ("atmega26hvg", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega26HVG__", 0x0100, 1, "m26hvg")
+AVR_MCU ("atmega32a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32A__", 0x0060, 1, "m32a")
+AVR_MCU ("atmega32", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32__", 0x0060, 1, "m32")
+AVR_MCU ("atmega323", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega323__", 0x0060, 1, "m323")
+AVR_MCU ("atmega324a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324A__", 0x0100, 1, "m324a")
+AVR_MCU ("atmega324p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324P__", 0x0100, 1, "m324p")
+AVR_MCU ("atmega324pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324PA__", 0x0100, 1, "m324pa")
+AVR_MCU ("atmega325", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325__", 0x0100, 1, "m325")
+AVR_MCU ("atmega325a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325A__", 0x0100, 1, "m325a")
+AVR_MCU ("atmega325p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325P__", 0x0100, 1, "m325p")
+AVR_MCU ("atmega3250", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250__", 0x0100, 1, "m3250")
+AVR_MCU ("atmega3250a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250A__", 0x0100, 1, "m3250a")
+AVR_MCU ("atmega3250p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250P__", 0x0100, 1, "m3250p")
+AVR_MCU ("atmega3250pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250PA__", 0x0100, 1, "m3250pa")
+AVR_MCU ("atmega328", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega328__", 0x0100, 1, "m328")
+AVR_MCU ("atmega328p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega328P__", 0x0100, 1, "m328p")
+AVR_MCU ("atmega329", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329__", 0x0100, 1, "m329")
+AVR_MCU ("atmega329a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329A__", 0x0100, 1, "m329a")
+AVR_MCU ("atmega329p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329P__", 0x0100, 1, "m329p")
+AVR_MCU ("atmega329pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329PA__", 0x0100, 1, "m329pa")
+AVR_MCU ("atmega3290", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290__", 0x0100, 1, "m3290")
+AVR_MCU ("atmega3290a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290A__", 0x0100, 1, "m3290a")
+AVR_MCU ("atmega3290p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290P__", 0x0100, 1, "m3290p")
+AVR_MCU ("atmega3290pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290PA__", 0x0100, 1, "m3290pa")
+AVR_MCU ("atmega32c1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32C1__", 0x0100, 1, "m32c1")
+AVR_MCU ("atmega32m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32M1__", 0x0100, 1, "m32m1")
+AVR_MCU ("atmega32u4", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32U4__", 0x0100, 1, "m32u4")
+AVR_MCU ("atmega32u6", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32U6__", 0x0100, 1, "m32u6")
+AVR_MCU ("atmega406", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega406__", 0x0100, 1, "m406")
+AVR_MCU ("atmega64", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64__", 0x0100, 1, "m64")
+AVR_MCU ("atmega64a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64A__", 0x0100, 1, "m64a")
+AVR_MCU ("atmega640", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega640__", 0x0200, 1, "m640")
+AVR_MCU ("atmega644", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644__", 0x0100, 1, "m644")
+AVR_MCU ("atmega644a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644A__", 0x0100, 1, "m644a")
+AVR_MCU ("atmega644p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644P__", 0x0100, 1, "m644p")
+AVR_MCU ("atmega644pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644PA__", 0x0100, 1, "m644pa")
+AVR_MCU ("atmega645", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645__", 0x0100, 1, "m645")
+AVR_MCU ("atmega645a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645A__", 0x0100, 1, "m645a")
+AVR_MCU ("atmega645p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645P__", 0x0100, 1, "m645p")
+AVR_MCU ("atmega6450", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450__", 0x0100, 1, "m6450")
+AVR_MCU ("atmega6450a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450A__", 0x0100, 1, "m6450a")
+AVR_MCU ("atmega6450p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450P__", 0x0100, 1, "m6450p")
+AVR_MCU ("atmega649", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649__", 0x0100, 1, "m649")
+AVR_MCU ("atmega649a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649A__", 0x0100, 1, "m649a")
+AVR_MCU ("atmega649p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649P__", 0x0100, 1, "m649p")
+AVR_MCU ("atmega6490", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490__", 0x0100, 1, "m6490")
+AVR_MCU ("atmega16hva", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVA__", 0x0100, 1, "m16hva")
+AVR_MCU ("atmega16hva2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVA2__", 0x0100, 1, "m16hva2")
+AVR_MCU ("atmega32hvb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32HVB__", 0x0100, 1, "m32hvb")
+AVR_MCU ("atmega6490a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490A__", 0x0100, 1, "m6490a")
+AVR_MCU ("atmega6490p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490P__", 0x0100, 1, "m6490p")
+AVR_MCU ("atmega64c1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64C1__", 0x0100, 1, "m64c1")
+AVR_MCU ("atmega64m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64M1__", 0x0100, 1, "m64m1")
+AVR_MCU ("atmega64hve", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64HVE__", 0x0100, 1, "m64hve")
+AVR_MCU ("atmega64rfa2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64RFA2__", 0x0200, 1, "m64rfa2")
+AVR_MCU ("atmega64rfr2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64RFR2__", 0x0200, 1, "m64rfr2")
+AVR_MCU ("atmega32hvbrevb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32HVBREVB__", 0x0100, 1, "m32hvbrevb")
+AVR_MCU ("atmega48hvf", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega48HVF__", 0x0100, 1, "m48hvf")
+AVR_MCU ("at90can32", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90CAN32__", 0x0100, 1, "can32")
+AVR_MCU ("at90can64", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90CAN64__", 0x0100, 1, "can64")
+AVR_MCU ("at90pwm161", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM161__", 0x0100, 1, "90pwm161")
+AVR_MCU ("at90pwm216", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM216__", 0x0100, 1, "90pwm216")
+AVR_MCU ("at90pwm316", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM316__", 0x0100, 1, "90pwm316")
+AVR_MCU ("at90scr100", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90SCR100__", 0x0100, 1, "90scr100")
+AVR_MCU ("at90usb646", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90USB646__", 0x0100, 1, "usb646")
+AVR_MCU ("at90usb647", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90USB647__", 0x0100, 1, "usb647")
+AVR_MCU ("at94k", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT94K__", 0x0060, 1, "at94k")
+AVR_MCU ("m3000", ARCH_AVR5, AVR_ISA_NONE, "__AVR_M3000__", 0x1000, 1, "m3000")
/* Enhanced, == 128K. */
-AVR_MCU ("avr51", ARCH_AVR51, NULL, 0, 0, 0x0100, 2, "m128")
-AVR_MCU ("atmega128", ARCH_AVR51, "__AVR_ATmega128__", 0, 0, 0x0100, 2, "m128")
-AVR_MCU ("atmega128a", ARCH_AVR51, "__AVR_ATmega128A__", 0, 0, 0x0100, 2, "m128a")
-AVR_MCU ("atmega1280", ARCH_AVR51, "__AVR_ATmega1280__", 0, 0, 0x0200, 2, "m1280")
-AVR_MCU ("atmega1281", ARCH_AVR51, "__AVR_ATmega1281__", 0, 0, 0x0200, 2, "m1281")
-AVR_MCU ("atmega1284", ARCH_AVR51, "__AVR_ATmega1284__", 0, 0, 0x0100, 2, "m1284")
-AVR_MCU ("atmega1284p", ARCH_AVR51, "__AVR_ATmega1284P__", 0, 0, 0x0100, 2, "m1284p")
-AVR_MCU ("atmega128rfa1", ARCH_AVR51, "__AVR_ATmega128RFA1__", 0, 0, 0x0200, 2, "m128rfa1")
-AVR_MCU ("at90can128", ARCH_AVR51, "__AVR_AT90CAN128__", 0, 0, 0x0100, 2, "can128")
-AVR_MCU ("at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__", 0, 0, 0x0100, 2, "usb1286")
-AVR_MCU ("at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__", 0, 0, 0x0100, 2, "usb1287")
+AVR_MCU ("avr51", ARCH_AVR51, AVR_ISA_NONE, NULL, 0x0100, 2, "m128")
+AVR_MCU ("atmega128", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128__", 0x0100, 2, "m128")
+AVR_MCU ("atmega128a", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128A__", 0x0100, 2, "m128a")
+AVR_MCU ("atmega1280", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1280__", 0x0200, 2, "m1280")
+AVR_MCU ("atmega1281", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1281__", 0x0200, 2, "m1281")
+AVR_MCU ("atmega1284", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1284__", 0x0100, 2, "m1284")
+AVR_MCU ("atmega1284p", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1284P__", 0x0100, 2, "m1284p")
+AVR_MCU ("atmega128rfa1", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128RFA1__", 0x0200, 2, "m128rfa1")
+AVR_MCU ("at90can128", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90CAN128__", 0x0100, 2, "can128")
+AVR_MCU ("at90usb1286", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90USB1286__", 0x0100, 2, "usb1286")
+AVR_MCU ("at90usb1287", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90USB1287__", 0x0100, 2, "usb1287")
/* 3-Byte PC. */
-AVR_MCU ("avr6", ARCH_AVR6, NULL, 0, 0, 0x0200, 4, "m2561")
-AVR_MCU ("atmega2560", ARCH_AVR6, "__AVR_ATmega2560__", 0, 0, 0x0200, 4, "m2560")
-AVR_MCU ("atmega2561", ARCH_AVR6, "__AVR_ATmega2561__", 0, 0, 0x0200, 4, "m2561")
+AVR_MCU ("avr6", ARCH_AVR6, AVR_ISA_NONE, NULL, 0x0200, 4, "m2561")
+AVR_MCU ("atmega2560", ARCH_AVR6, AVR_ISA_NONE, "__AVR_ATmega2560__", 0x0200, 4, "m2560")
+AVR_MCU ("atmega2561", ARCH_AVR6, AVR_ISA_NONE, "__AVR_ATmega2561__", 0x0200, 4, "m2561")
/* Xmega, 16K <= Flash < 64K, RAM <= 64K */
-AVR_MCU ("avrxmega2", ARCH_AVRXMEGA2, NULL, 0, 0, 0x2000, 1, "x32a4")
-AVR_MCU ("atxmega16a4", ARCH_AVRXMEGA2, "__AVR_ATxmega16A4__", 0, 0, 0x2000, 1, "x16a4")
-AVR_MCU ("atxmega16d4", ARCH_AVRXMEGA2, "__AVR_ATxmega16D4__", 0, 0, 0x2000, 1, "x16d4")
-AVR_MCU ("atxmega32a4", ARCH_AVRXMEGA2, "__AVR_ATxmega32A4__", 0, 0, 0x2000, 1, "x32a4")
-AVR_MCU ("atxmega32d4", ARCH_AVRXMEGA2, "__AVR_ATxmega32D4__", 0, 0, 0x2000, 1, "x32d4")
-AVR_MCU ("atxmega32x1", ARCH_AVRXMEGA2, "__AVR_ATxmega32X1__", 0, 0, 0x2000, 1, "x32x1")
-AVR_MCU ("atmxt112sl", ARCH_AVRXMEGA2, "__AVR_ATMXT112SL__", 0, 0, 0x2000, 1, "mxt112sl")
-AVR_MCU ("atmxt224", ARCH_AVRXMEGA2, "__AVR_ATMXT224__", 0, 0, 0x2000, 1, "mxt224")
-AVR_MCU ("atmxt224e", ARCH_AVRXMEGA2, "__AVR_ATMXT224E__", 0, 0, 0x2000, 1, "mxt224e")
-AVR_MCU ("atmxt336s", ARCH_AVRXMEGA2, "__AVR_ATMXT336S__", 0, 0, 0x2000, 1, "mxt336s")
-AVR_MCU ("atxmega16a4u", ARCH_AVRXMEGA2, "__AVR_ATxmega16A4U__", 0, 0, 0x2000, 1, "x16a4u")
-AVR_MCU ("atxmega16c4", ARCH_AVRXMEGA2, "__AVR_ATxmega16C4__", 0, 0, 0x2000, 1, "x16c4")
-AVR_MCU ("atxmega32a4u", ARCH_AVRXMEGA2, "__AVR_ATxmega32A4U__", 0, 0, 0x2000, 1, "x32a4u")
-AVR_MCU ("atxmega32c4", ARCH_AVRXMEGA2, "__AVR_ATxmega32C4__", 0, 0, 0x2000, 1, "x32c4")
-AVR_MCU ("atxmega32e5", ARCH_AVRXMEGA2, "__AVR_ATxmega32E5__", 0, 0, 0x2000, 1, "x32e5")
+AVR_MCU ("avrxmega2", ARCH_AVRXMEGA2, AVR_ISA_NONE, NULL, 0x2000, 1, "x32a4")
+AVR_MCU ("atxmega16a4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega16A4__", 0x2000, 1, "x16a4")
+AVR_MCU ("atxmega16d4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega16D4__", 0x2000, 1, "x16d4")
+AVR_MCU ("atxmega32a4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32A4__", 0x2000, 1, "x32a4")
+AVR_MCU ("atxmega32d4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32D4__", 0x2000, 1, "x32d4")
+AVR_MCU ("atxmega32x1", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32X1__", 0x2000, 1, "x32x1")
+AVR_MCU ("atmxt112sl", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT112SL__", 0x2000, 1, "mxt112sl")
+AVR_MCU ("atmxt224", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT224__", 0x2000, 1, "mxt224")
+AVR_MCU ("atmxt224e", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT224E__", 0x2000, 1, "mxt224e")
+AVR_MCU ("atmxt336s", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT336S__", 0x2000, 1, "mxt336s")
+AVR_MCU ("atxmega16a4u", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega16A4U__", 0x2000, 1, "x16a4u")
+AVR_MCU ("atxmega16c4", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega16C4__", 0x2000, 1, "x16c4")
+AVR_MCU ("atxmega32a4u", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega32A4U__", 0x2000, 1, "x32a4u")
+AVR_MCU ("atxmega32c4", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega32C4__", 0x2000, 1, "x32c4")
+AVR_MCU ("atxmega32e5", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32E5__", 0x2000, 1, "x32e5")
/* Xmega, 64K < Flash <= 128K, RAM <= 64K */
-AVR_MCU ("avrxmega4", ARCH_AVRXMEGA4, NULL, 0, 0, 0x2000, 2, "x64a4")
-AVR_MCU ("atxmega64a3", ARCH_AVRXMEGA4, "__AVR_ATxmega64A3__", 0, 0, 0x2000, 2, "x64a3")
-AVR_MCU ("atxmega64d3", ARCH_AVRXMEGA4, "__AVR_ATxmega64D3__", 0, 0, 0x2000, 2, "x64d3")
-AVR_MCU ("atxmega64a3u", ARCH_AVRXMEGA4, "__AVR_ATxmega64A3U__", 0, 0, 0x2000, 2, "x64a3u")
-AVR_MCU ("atxmega64a4u", ARCH_AVRXMEGA4, "__AVR_ATxmega64A4U__", 0, 0, 0x2000, 2, "x64a4u")
-AVR_MCU ("atxmega64b1", ARCH_AVRXMEGA4, "__AVR_ATxmega64B1__", 0, 0, 0x2000, 2, "x64b1")
-AVR_MCU ("atxmega64b3", ARCH_AVRXMEGA4, "__AVR_ATxmega64B3__", 0, 0, 0x2000, 2, "x64b3")
-AVR_MCU ("atxmega64c3", ARCH_AVRXMEGA4, "__AVR_ATxmega64C3__", 0, 0, 0x2000, 2, "x64c3")
-AVR_MCU ("atxmega64d4", ARCH_AVRXMEGA4, "__AVR_ATxmega64D4__", 0, 0, 0x2000, 2, "x64d4")
+AVR_MCU ("avrxmega4", ARCH_AVRXMEGA4, AVR_ISA_NONE, NULL, 0x2000, 2, "x64a4")
+AVR_MCU ("atxmega64a3", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64A3__", 0x2000, 2, "x64a3")
+AVR_MCU ("atxmega64d3", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64D3__", 0x2000, 2, "x64d3")
+AVR_MCU ("atxmega64a3u", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64A3U__", 0x2000, 2, "x64a3u")
+AVR_MCU ("atxmega64a4u", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64A4U__", 0x2000, 2, "x64a4u")
+AVR_MCU ("atxmega64b1", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64B1__", 0x2000, 2, "x64b1")
+AVR_MCU ("atxmega64b3", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64B3__", 0x2000, 2, "x64b3")
+AVR_MCU ("atxmega64c3", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64C3__", 0x2000, 2, "x64c3")
+AVR_MCU ("atxmega64d4", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64D4__", 0x2000, 2, "x64d4")
/* Xmega, 64K < Flash <= 128K, RAM > 64K */
-AVR_MCU ("avrxmega5", ARCH_AVRXMEGA5, NULL, 0, 0, 0x2000, 2, "x64a1")
-AVR_MCU ("atxmega64a1", ARCH_AVRXMEGA5, "__AVR_ATxmega64A1__", 0, 0, 0x2000, 2, "x64a1")
-AVR_MCU ("atxmega64a1u", ARCH_AVRXMEGA5, "__AVR_ATxmega64A1U__", 0, 0, 0x2000, 2, "x64a1u")
+AVR_MCU ("avrxmega5", ARCH_AVRXMEGA5, AVR_ISA_NONE, NULL, 0x2000, 2, "x64a1")
+AVR_MCU ("atxmega64a1", ARCH_AVRXMEGA5, AVR_ISA_NONE, "__AVR_ATxmega64A1__", 0x2000, 2, "x64a1")
+AVR_MCU ("atxmega64a1u", ARCH_AVRXMEGA5, AVR_ISA_RMW, "__AVR_ATxmega64A1U__", 0x2000, 2, "x64a1u")
/* Xmega, 128K < Flash, RAM <= 64K */
-AVR_MCU ("avrxmega6", ARCH_AVRXMEGA6, NULL, 0, 0, 0x2000, 6, "x128a3")
-AVR_MCU ("atxmega128a3", ARCH_AVRXMEGA6, "__AVR_ATxmega128A3__", 0, 0, 0x2000, 3, "x128a3")
-AVR_MCU ("atxmega128d3", ARCH_AVRXMEGA6, "__AVR_ATxmega128D3__", 0, 0, 0x2000, 3, "x128d3")
-AVR_MCU ("atxmega192a3", ARCH_AVRXMEGA6, "__AVR_ATxmega192A3__", 0, 0, 0x2000, 4, "x192a3")
-AVR_MCU ("atxmega192d3", ARCH_AVRXMEGA6, "__AVR_ATxmega192D3__", 0, 0, 0x2000, 4, "x192d3")
-AVR_MCU ("atxmega256a3", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3__", 0, 0, 0x2000, 5, "x256a3")
-AVR_MCU ("atxmega256a3b", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3B__", 0, 0, 0x2000, 5, "x256a3b")
-AVR_MCU ("atxmega256a3bu", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3BU__", 0, 0, 0x2000, 5, "x256a3bu")
-AVR_MCU ("atxmega256d3", ARCH_AVRXMEGA6, "__AVR_ATxmega256D3__", 0, 0, 0x2000, 5, "x256d3")
-AVR_MCU ("atxmega128a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega128A3U__", 0, 0, 0x2000, 3, "x128a3u")
-AVR_MCU ("atxmega128b1", ARCH_AVRXMEGA6, "__AVR_ATxmega128B1__", 0, 0, 0x2000, 3, "x128b1")
-AVR_MCU ("atxmega128b3", ARCH_AVRXMEGA6, "__AVR_ATxmega128B3__", 0, 0, 0x2000, 3, "x128b3")
-AVR_MCU ("atxmega128c3", ARCH_AVRXMEGA6, "__AVR_ATxmega128C3__", 0, 0, 0x2000, 3, "x128c3")
-AVR_MCU ("atxmega128d4", ARCH_AVRXMEGA6, "__AVR_ATxmega128D4__", 0, 0, 0x2000, 3, "x128d4")
-AVR_MCU ("atmxt540s", ARCH_AVRXMEGA6, "__AVR_ATMXT540S__", 0, 0, 0x2000, 2, "mxt540s")
-AVR_MCU ("atmxt540sreva", ARCH_AVRXMEGA6, "__AVR_ATMXT540SREVA__", 0, 0, 0x2000, 2, "mxt540sreva")
-AVR_MCU ("atxmega192a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega192A3U__", 0, 0, 0x2000, 4, "x192a3u")
-AVR_MCU ("atxmega192c3", ARCH_AVRXMEGA6, "__AVR_ATxmega192C3__", 0, 0, 0x2000, 4, "x192c3")
-AVR_MCU ("atxmega256a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3U__", 0, 0, 0x2000, 5, "x256a3u")
-AVR_MCU ("atxmega256c3", ARCH_AVRXMEGA6, "__AVR_ATxmega256C3__", 0, 0, 0x2000, 5, "x256c3")
-AVR_MCU ("atxmega384c3", ARCH_AVRXMEGA6, "__AVR_ATxmega384C3__", 0, 0, 0x2000, 6, "x384c3")
-AVR_MCU ("atxmega384d3", ARCH_AVRXMEGA6, "__AVR_ATxmega384D3__", 0, 0, 0x2000, 6, "x384d3")
+AVR_MCU ("avrxmega6", ARCH_AVRXMEGA6, AVR_ISA_NONE, NULL, 0x2000, 6, "x128a3")
+AVR_MCU ("atxmega128a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128A3__", 0x2000, 3, "x128a3")
+AVR_MCU ("atxmega128d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128D3__", 0x2000, 3, "x128d3")
+AVR_MCU ("atxmega192a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega192A3__", 0x2000, 4, "x192a3")
+AVR_MCU ("atxmega192d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega192D3__", 0x2000, 4, "x192d3")
+AVR_MCU ("atxmega256a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256A3__", 0x2000, 5, "x256a3")
+AVR_MCU ("atxmega256a3b", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256A3B__", 0x2000, 5, "x256a3b")
+AVR_MCU ("atxmega256a3bu", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega258A3BU__", 0x2000, 5, "x256a3bu")
+AVR_MCU ("atxmega256d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256D3__", 0x2000, 5, "x256d3")
+AVR_MCU ("atxmega128a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128A3U__", 0x2000, 3, "x128a3u")
+AVR_MCU ("atxmega128b1", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128B1__", 0x2000, 3, "x128b1")
+AVR_MCU ("atxmega128b3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128B3__", 0x2000, 3, "x128b3")
+AVR_MCU ("atxmega128c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128C3__", 0x2000, 3, "x128c3")
+AVR_MCU ("atxmega128d4", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128D4__", 0x2000, 3, "x128d4")
+AVR_MCU ("atmxt540s", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATMXT540S__", 0x2000, 2, "mxt540s")
+AVR_MCU ("atmxt540sreva", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATMXT540SREVA__", 0x2000, 2, "mxt540sreva")
+AVR_MCU ("atxmega192a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega192A3U__", 0x2000, 4, "x192a3u")
+AVR_MCU ("atxmega192c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega192C3__", 0x2000, 4, "x192c3")
+AVR_MCU ("atxmega256a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega256A3U__", 0x2000, 5, "x256a3u")
+AVR_MCU ("atxmega256c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega256C3__", 0x2000, 5, "x256c3")
+AVR_MCU ("atxmega384c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega384C3__", 0x2000, 6, "x384c3")
+AVR_MCU ("atxmega384d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega384D3__", 0x2000, 6, "x384d3")
/* Xmega, 128K < Flash, RAM > 64K RAM. */
-AVR_MCU ("avrxmega7", ARCH_AVRXMEGA7, NULL, 0, 0, 0x2000, 3, "x128a1")
-AVR_MCU ("atxmega128a1", ARCH_AVRXMEGA7, "__AVR_ATxmega128A1__", 0, 0, 0x2000, 3, "x128a1")
-AVR_MCU ("atxmega128a1u", ARCH_AVRXMEGA7, "__AVR_ATxmega128A1U__", 0, 0, 0x2000, 3, "x128a1u")
-AVR_MCU ("atxmega128a4u", ARCH_AVRXMEGA7, "__AVR_ATxmega128A4U__", 0, 0, 0x2000, 3, "x128a4u")
+AVR_MCU ("avrxmega7", ARCH_AVRXMEGA7, AVR_ISA_NONE, NULL, 0x2000, 3, "x128a1")
+AVR_MCU ("atxmega128a1", ARCH_AVRXMEGA7, AVR_ISA_NONE, "__AVR_ATxmega128A1__", 0x2000, 3, "x128a1")
+AVR_MCU ("atxmega128a1u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A1U__", 0x2000, 3, "x128a1u")
+AVR_MCU ("atxmega128a4u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A4U__", 0x2000, 3, "x128a4u")
/* Assembler only. */
-AVR_MCU ("avr1", ARCH_AVR1, NULL, 0, 0, 0x0060, 1, "s1200")
-AVR_MCU ("at90s1200", ARCH_AVR1, "__AVR_AT90S1200__", 0, 0, 0x0060, 1, "s1200")
-AVR_MCU ("attiny11", ARCH_AVR1, "__AVR_ATtiny11__", 0, 0, 0x0060, 1, "tn11")
-AVR_MCU ("attiny12", ARCH_AVR1, "__AVR_ATtiny12__", 0, 0, 0x0060, 1, "tn12")
-AVR_MCU ("attiny15", ARCH_AVR1, "__AVR_ATtiny15__", 0, 0, 0x0060, 1, "tn15")
-AVR_MCU ("attiny28", ARCH_AVR1, "__AVR_ATtiny28__", 0, 0, 0x0060, 1, "tn28")
+AVR_MCU ("avr1", ARCH_AVR1, AVR_ISA_NONE, NULL, 0x0060, 1, "s1200")
+AVR_MCU ("at90s1200", ARCH_AVR1, AVR_ISA_NONE, "__AVR_AT90S1200__", 0x0060, 1, "s1200")
+AVR_MCU ("attiny11", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny11__", 0x0060, 1, "tn11")
+AVR_MCU ("attiny12", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny12__", 0x0060, 1, "tn12")
+AVR_MCU ("attiny15", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny15__", 0x0060, 1, "tn15")
+AVR_MCU ("attiny28", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny28__", 0x0060, 1, "tn28")
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 8ca7de0b36d..99644ec927d 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -10120,7 +10120,7 @@ test_hard_reg_class (enum reg_class rclass, rtx x)
static bool
avr_2word_insn_p (rtx insn)
{
- if (avr_current_device->errata_skip
+ if ((avr_current_device->dev_attribute & AVR_ERRATA_SKIP)
|| !insn
|| 2 != get_attr_length (insn))
{
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 74be83c8aa0..78434ec5e0d 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -88,8 +88,9 @@ enum
__AVR_HAVE_8BIT_SP__ and __AVR_HAVE_16BIT_SP__. During multilib generation
there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__. */
-#define AVR_HAVE_8BIT_SP \
- (avr_current_device->short_sp || TARGET_TINY_STACK || avr_sp8)
+#define AVR_HAVE_8BIT_SP \
+ ((avr_current_device->dev_attribute & AVR_SHORT_SP) || \
+ TARGET_TINY_STACK || avr_sp8)
#define AVR_HAVE_SPH (!avr_sp8)
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index f2d8605cd20..d7baa4a8383 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -5342,7 +5342,7 @@
(label_ref (match_operand 0 "" ""))
(pc)))]
"!AVR_HAVE_JMP_CALL
- || !avr_current_device->errata_skip"
+ || !(avr_current_device->dev_attribute & AVR_ERRATA_SKIP)"
{
if (operands[2] == CONST0_RTX (<MODE>mode))
operands[2] = zero_reg_rtx;
diff --git a/gcc/config/avr/driver-avr.c b/gcc/config/avr/driver-avr.c
index cb5dd1d1d89..76c8b398064 100644
--- a/gcc/config/avr/driver-avr.c
+++ b/gcc/config/avr/driver-avr.c
@@ -59,8 +59,8 @@ avr_device_to_as (int argc, const char **argv)
avr_set_current_device (argv[0]);
return concat ("-mmcu=", avr_current_arch->arch_name,
- avr_current_device->errata_skip ? "" : " -mno-skip-bug",
- NULL);
+ avr_current_device->dev_attribute & AVR_ERRATA_SKIP ? "" : " -mno-skip-bug",
+ avr_current_device->dev_attribute & AVR_ISA_RMW ? " -mrmw" : "", NULL);
}
/* Returns command line parameters to pass to ld. */
@@ -144,7 +144,7 @@ avr_device_to_sp8 (int argc, const char **argv)
|| avr_current_device->arch == ARCH_AVR25))
return "";
- return avr_current_device->short_sp
+ return (avr_current_device->dev_attribute & AVR_SHORT_SP)
? "-msp8"
: "%<msp8";
}
diff --git a/gcc/config/avr/genmultilib.awk b/gcc/config/avr/genmultilib.awk
index 90e5e5cfd36..1dfeabbee49 100644
--- a/gcc/config/avr/genmultilib.awk
+++ b/gcc/config/avr/genmultilib.awk
@@ -86,7 +86,7 @@ BEGIN {
name = $2
gsub ("\"", "", name)
- if ($4 == "NULL")
+ if ($5 == "NULL")
{
core = name
@@ -106,7 +106,17 @@ BEGIN {
if (core == "avr1")
next
- tiny_stack[name] = $5
+ # split device specific feature list
+ n = split($4,dev_attribute,"|")
+
+ # set tiny_stack false by default
+ tiny_stack[name] = 0
+ for (i=1; i <= n; i++)
+ if (dev_attribute[i] == "AVR_SHORT_SP") {
+ tiny_stack[name] = 1
+ break
+ }
+
mcu[n_mcu] = name
n_mcu++
option[name] = "mmcu=" name
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 1fce7011b2b..c1d5553123d 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -287,7 +287,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* Write the extra assembler code needed to declare an object properly. */
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
-#define USE_GNU_UNIQUE_OBJECT 1
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
#else
#define USE_GNU_UNIQUE_OBJECT 0
#endif
diff --git a/gcc/config/moxie/moxie.md b/gcc/config/moxie/moxie.md
index edefef80b81..793cac3f8ca 100644
--- a/gcc/config/moxie/moxie.md
+++ b/gcc/config/moxie/moxie.md
@@ -247,7 +247,7 @@
;
ld.b %0, %1
lda.b %0, %1
- ldo.b %0, %1
+ ldo.b %0, %1"
"reload_completed"
[(set (match_dup 2) (match_dup 1))
(set (match_dup 0) (zero_extend:SI (match_dup 2)))]
@@ -264,7 +264,7 @@
;
ld.s %0, %1
lda.s %0, %1
- ldo.s %0, %1
+ ldo.s %0, %1"
"reload_completed"
[(set (match_dup 2) (match_dup 1))
(set (match_dup 0) (zero_extend:SI (match_dup 2)))]
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index fb698d20d80..871e4e5c6e8 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -4187,13 +4187,17 @@ pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
if (TARGET_SOM && TARGET_GAS)
{
- /* We done with this subspace except possibly for some additional
+ /* We are done with this subspace except possibly for some additional
debug information. Forget that we are in this subspace to ensure
that the next function is output in its own subspace. */
in_section = NULL;
cfun->machine->in_nsubspa = 2;
}
+ /* Thunks do their own accounting. */
+ if (cfun->is_thunk)
+ return;
+
if (INSN_ADDRESSES_SET_P ())
{
insn = get_last_nonnote_insn ();
@@ -8259,8 +8263,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
xoperands[2] = GEN_INT (delta);
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
+ final_start_function (emit_barrier (), file, 1);
/* Output the thunk. We know that the function is in the same
translation unit (i.e., the same space) as the thunk, and that
@@ -8466,16 +8469,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
}
}
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
-
- if (TARGET_SOM && TARGET_GAS)
- {
- /* We done with this subspace except possibly for some additional
- debug information. Forget that we are in this subspace to ensure
- that the next function is output in its own subspace. */
- in_section = NULL;
- cfun->machine->in_nsubspa = 2;
- }
+ final_end_function ();
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
{
diff --git a/gcc/config/rl78/rl78-expand.md b/gcc/config/rl78/rl78-expand.md
index f794d7cb13d..f61e444b5da 100644
--- a/gcc/config/rl78/rl78-expand.md
+++ b/gcc/config/rl78/rl78-expand.md
@@ -30,18 +30,23 @@
if (rl78_far_p (operands[0]) && rl78_far_p (operands[1]))
operands[1] = copy_to_mode_reg (QImode, operands[1]);
- /* FIXME: Not sure how GCC can generate (SUBREG (SYMBOL_REF)),
- but it does. Since this makes no sense, reject it here. */
+ /* GCC can generate (SUBREG (SYMBOL_REF)) when it has to store a symbol
+ into a bitfield, or a packed ordinary field. We can handle this
+ provided that the destination is a register. If not, then load the
+ source into a register first. */
if (GET_CODE (operands[1]) == SUBREG
- && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- FAIL;
+ && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
+ && ! REG_P (operands[0]))
+ operands[1] = copy_to_mode_reg (QImode, operands[1]);
+
/* Similarly for (SUBREG (CONST (PLUS (SYMBOL_REF)))).
cf. g++.dg/abi/packed.C. */
if (GET_CODE (operands[1]) == SUBREG
&& GET_CODE (XEXP (operands[1], 0)) == CONST
&& GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == PLUS
- && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF)
- FAIL;
+ && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF
+ && ! REG_P (operands[0]))
+ operands[1] = copy_to_mode_reg (QImode, operands[1]);
if (CONST_INT_P (operands[1]) && ! IN_RANGE (INTVAL (operands[1]), (-1 << 8) + 1, (1 << 8) - 1))
FAIL;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 43094b38c8c..60aa29f576e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,50 @@
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (check_bases_and_members): Warn about non-virtual dtors
+ in public bases only. Check warn_ecpp before complaining about
+ non-polymorphic bases.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * decl.c (duplicate_decls): Check for the return of warning_at
+ before emitting a note.
+ (warn_misplaced_attr_for_class_type): Likewise.
+ (check_tag_decl): Likewise.
+
+2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58207
+ * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
+
+2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
+
+ PR c++/44613
+ * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
+ * decl.c (cp_finish_decl): Create a new BIND_EXPR before
+ instantiating a variable-sized type.
+
+ PR c++/21113
+ * decl.c (decl_jump_unsafe): Consider variably-modified decls.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * class.c (find_abi_tags_r): Check for the return of warning
+ before emitting a note.
+ (one_inherited_ctor): Likewise.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * decl.c (duplicate_decls): Check for the return of permerror
+ before emitting a note.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (accessible_nvdtor_p): New.
+ (check_bases): Don't check base destructor here ...
+ (check_bases_and_members): ... check them here. Trigger on
+ Wnon-virtual-dtor flag.
+ (finish_struct_1): Use accessible_nvdtor_p.
+
2014-04-01 Jason Merrill <jason@redhat.com>
* pt.c (process_partial_specialization): Say "not deducible"
@@ -58,9 +105,9 @@
2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/52369
- * cp/method.c (walk_field_subobs): Improve the diagnostic
+ * method.c (walk_field_subobs): Improve the diagnostic
locations for both REFERENCE_TYPEs and non-static const members.
- * cp/init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
+ * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
instead of %qD to be consistent with the c++11 diagnostic.
2014-03-25 Jason Merrill <jason@redhat.com>
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index d277e0758ee..334bfd5eee7 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -149,6 +149,7 @@ static tree *build_base_field (record_layout_info, tree, splay_tree, tree *);
static void build_base_fields (record_layout_info, splay_tree, tree *);
static void check_methods (tree);
static void remove_zero_width_bit_fields (tree);
+static bool accessible_nvdtor_p (tree);
static void check_bases (tree, int *, int *);
static void check_bases_and_members (tree);
static tree create_vtable_ptr (tree, tree *);
@@ -1384,19 +1385,21 @@ find_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
/* Otherwise we're diagnosing missing tags. */
else if (TYPE_P (p->subob))
{
- warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
- "that base %qT has", p->t, tag, p->subob);
- inform (location_of (p->subob), "%qT declared here",
- p->subob);
+ if (warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
+ "that base %qT has", p->t, tag, p->subob))
+ inform (location_of (p->subob), "%qT declared here",
+ p->subob);
}
else
{
- warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
- "that %qT (used in the type of %qD) has",
- p->t, tag, *tp, p->subob);
- inform (location_of (p->subob), "%qD declared here",
- p->subob);
- inform (location_of (*tp), "%qT declared here", *tp);
+ if (warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
+ "that %qT (used in the type of %qD) has",
+ p->t, tag, *tp, p->subob))
+ {
+ inform (location_of (p->subob), "%qD declared here",
+ p->subob);
+ inform (location_of (*tp), "%qT declared here", *tp);
+ }
}
}
}
@@ -1476,6 +1479,33 @@ inherit_targ_abi_tags (tree t)
mark_type_abi_tags (t, false);
}
+/* Return true, iff class T has a non-virtual destructor that is
+ accessible from outside the class heirarchy (i.e. is public, or
+ there's a suitable friend. */
+
+static bool
+accessible_nvdtor_p (tree t)
+{
+ tree dtor = CLASSTYPE_DESTRUCTORS (t);
+
+ /* An implicitly declared destructor is always public. And,
+ if it were virtual, we would have created it by now. */
+ if (!dtor)
+ return true;
+
+ if (DECL_VINDEX (dtor))
+ return false; /* Virtual */
+
+ if (!TREE_PRIVATE (dtor) && !TREE_PROTECTED (dtor))
+ return true; /* Public */
+
+ if (CLASSTYPE_FRIEND_CLASSES (t)
+ || DECL_FRIENDLIST (TYPE_MAIN_DECL (t)))
+ return true; /* Has friends */
+
+ return false;
+}
+
/* Run through the base classes of T, updating CANT_HAVE_CONST_CTOR_P,
and NO_CONST_ASN_REF_P. Also set flag bits in T based on
properties of the bases. */
@@ -1512,13 +1542,6 @@ check_bases (tree t,
if (!CLASSTYPE_LITERAL_P (basetype))
CLASSTYPE_LITERAL_P (t) = false;
- /* Effective C++ rule 14. We only need to check TYPE_POLYMORPHIC_P
- here because the case of virtual functions but non-virtual
- dtor is handled in finish_struct_1. */
- if (!TYPE_POLYMORPHIC_P (basetype))
- warning (OPT_Weffc__,
- "base class %q#T has a non-virtual destructor", basetype);
-
/* If the base class doesn't have copy constructors or
assignment operators that take const references, then the
derived class cannot have such a member automatically
@@ -3062,9 +3085,9 @@ one_inherited_ctor (tree ctor, tree t)
one_inheriting_sig (t, ctor, new_parms, i);
if (parms == NULL_TREE)
{
- warning (OPT_Winherited_variadic_ctor,
- "the ellipsis in %qD is not inherited", ctor);
- inform (DECL_SOURCE_LOCATION (ctor), "%qD declared here", ctor);
+ if (warning (OPT_Winherited_variadic_ctor,
+ "the ellipsis in %qD is not inherited", ctor))
+ inform (DECL_SOURCE_LOCATION (ctor), "%qD declared here", ctor);
}
}
@@ -5547,6 +5570,30 @@ check_bases_and_members (tree t)
TYPE_HAS_COMPLEX_MOVE_ASSIGN (t) |= TYPE_CONTAINS_VPTR_P (t);
TYPE_HAS_COMPLEX_DFLT (t) |= TYPE_CONTAINS_VPTR_P (t);
+ /* Warn if a public base of a polymorphic type has an accessible
+ non-virtual destructor. It is only now that we know the class is
+ polymorphic. Although a polymorphic base will have a already
+ been diagnosed during its definition, we warn on use too. */
+ if (TYPE_POLYMORPHIC_P (t) && warn_nonvdtor)
+ {
+ tree binfo = TYPE_BINFO (t);
+ vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (binfo);
+ tree base_binfo;
+ unsigned i;
+
+ for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
+ {
+ tree basetype = TREE_TYPE (base_binfo);
+
+ if ((*accesses)[i] == access_public_node
+ && (TYPE_POLYMORPHIC_P (basetype) || warn_ecpp)
+ && accessible_nvdtor_p (basetype))
+ warning (OPT_Wnon_virtual_dtor,
+ "base class %q#T has accessible non-virtual destructor",
+ basetype);
+ }
+ }
+
/* If the class has no user-declared constructor, but does have
non-static const or reference data members that can never be
initialized, issue a warning. */
@@ -6597,25 +6644,11 @@ finish_struct_1 (tree t)
/* This warning does not make sense for Java classes, since they
cannot have destructors. */
- if (!TYPE_FOR_JAVA (t) && warn_nonvdtor && TYPE_POLYMORPHIC_P (t))
- {
- tree dtor;
-
- dtor = CLASSTYPE_DESTRUCTORS (t);
- if (/* An implicitly declared destructor is always public. And,
- if it were virtual, we would have created it by now. */
- !dtor
- || (!DECL_VINDEX (dtor)
- && (/* public non-virtual */
- (!TREE_PRIVATE (dtor) && !TREE_PROTECTED (dtor))
- || (/* non-public non-virtual with friends */
- (TREE_PRIVATE (dtor) || TREE_PROTECTED (dtor))
- && (CLASSTYPE_FRIEND_CLASSES (t)
- || DECL_FRIENDLIST (TYPE_MAIN_DECL (t)))))))
- warning (OPT_Wnon_virtual_dtor,
- "%q#T has virtual functions and accessible"
- " non-virtual destructor", t);
- }
+ if (!TYPE_FOR_JAVA (t) && warn_nonvdtor
+ && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t))
+ warning (OPT_Wnon_virtual_dtor,
+ "%q#T has virtual functions and accessible"
+ " non-virtual destructor", t);
complete_vars (t);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f3a081b8a8f..34005944246 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1648,10 +1648,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
&& prototype_p (TREE_TYPE (newdecl)))
{
/* Prototype decl follows defn w/o prototype. */
- warning_at (DECL_SOURCE_LOCATION (newdecl), 0,
- "prototype specified for %q#D", newdecl);
- inform (DECL_SOURCE_LOCATION (olddecl),
- "previous non-prototype definition here");
+ if (warning_at (DECL_SOURCE_LOCATION (newdecl), 0,
+ "prototype specified for %q#D", newdecl))
+ inform (DECL_SOURCE_LOCATION (olddecl),
+ "previous non-prototype definition here");
}
else if (VAR_OR_FUNCTION_DECL_P (olddecl)
&& DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl))
@@ -1737,9 +1737,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
if (permerror (input_location,
"default argument given for parameter "
"%d of %q#D", i, newdecl))
- permerror (DECL_SOURCE_LOCATION (olddecl),
- "previous specification in %q#D here",
- olddecl);
+ inform (DECL_SOURCE_LOCATION (olddecl),
+ "previous specification in %q#D here",
+ olddecl);
}
else
{
@@ -2785,12 +2785,11 @@ decl_jump_unsafe (tree decl)
|| type == error_mark_node)
return 0;
- type = strip_array_types (type);
-
- if (DECL_NONTRIVIALLY_INITIALIZED_P (decl))
+ if (DECL_NONTRIVIALLY_INITIALIZED_P (decl)
+ || variably_modified_type_p (type, NULL_TREE))
return 2;
- if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (decl)))
+ if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
return 1;
return 0;
@@ -4242,12 +4241,12 @@ warn_misplaced_attr_for_class_type (source_location location,
{
gcc_assert (OVERLOAD_TYPE_P (class_type));
- warning_at (location, OPT_Wattributes,
- "attribute ignored in declaration "
- "of %q#T", class_type);
- inform (location,
- "attribute for %q#T must follow the %qs keyword",
- class_type, class_key_or_enum_as_string (class_type));
+ if (warning_at (location, OPT_Wattributes,
+ "attribute ignored in declaration "
+ "of %q#T", class_type))
+ inform (location,
+ "attribute for %q#T must follow the %qs keyword",
+ class_type, class_key_or_enum_as_string (class_type));
}
/* Make sure that a declaration with no declarator is well-formed, i.e.
@@ -4374,12 +4373,12 @@ check_tag_decl (cp_decl_specifier_seq *declspecs,
No attribute-specifier-seq shall appertain to an explicit
instantiation. */
{
- warning_at (loc, OPT_Wattributes,
- "attribute ignored in explicit instantiation %q#T",
- declared_type);
- inform (loc,
- "no attribute can be applied to "
- "an explicit instantiation");
+ if (warning_at (loc, OPT_Wattributes,
+ "attribute ignored in explicit instantiation %q#T",
+ declared_type))
+ inform (loc,
+ "no attribute can be applied to "
+ "an explicit instantiation");
}
else
warn_misplaced_attr_for_class_type (loc, declared_type);
@@ -6441,7 +6440,24 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
after the call to check_initializer so that the DECL_EXPR for a
reference temp is added before the DECL_EXPR for the reference itself. */
if (DECL_FUNCTION_SCOPE_P (decl))
- add_decl_expr (decl);
+ {
+ /* If we're building a variable sized type, and we might be
+ reachable other than via the top of the current binding
+ level, then create a new BIND_EXPR so that we deallocate
+ the object at the right time. */
+ if (VAR_P (decl)
+ && DECL_SIZE (decl)
+ && !TREE_CONSTANT (DECL_SIZE (decl))
+ && STATEMENT_LIST_HAS_LABEL (cur_stmt_list))
+ {
+ tree bind;
+ bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
+ TREE_SIDE_EFFECTS (bind) = 1;
+ add_stmt (bind);
+ BIND_EXPR_BODY (bind) = push_stmt_list ();
+ }
+ add_decl_expr (decl);
+ }
/* Let the middle end know about variables and functions -- but not
static data members in uninstantiated class templates. */
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 07d10576957..3619e271df0 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -386,6 +386,9 @@ add_stmt (tree t)
STMT_IS_FULL_EXPR_P (t) = stmts_are_full_exprs_p ();
}
+ if (code == LABEL_EXPR || code == CASE_LABEL_EXPR)
+ STATEMENT_LIST_HAS_LABEL (cur_stmt_list) = 1;
+
/* Add T to the statement-tree. Non-side-effect statements need to be
recorded during statement expressions. */
gcc_checking_assert (!stmt_list_stack->is_empty ());
@@ -7717,8 +7720,8 @@ sort_constexpr_mem_initializers (tree type, vec<constructor_elt, va_gc> *v)
{
tree pri = CLASSTYPE_PRIMARY_BINFO (type);
tree field_type;
- constructor_elt elt;
- int i;
+ unsigned i;
+ constructor_elt *ce;
if (pri)
field_type = BINFO_TYPE (pri);
@@ -7729,14 +7732,14 @@ sort_constexpr_mem_initializers (tree type, vec<constructor_elt, va_gc> *v)
/* Find the element for the primary base or vptr and move it to the
beginning of the vec. */
- vec<constructor_elt, va_gc> &vref = *v;
- for (i = 0; ; ++i)
- if (TREE_TYPE (vref[i].index) == field_type)
+ for (i = 0; vec_safe_iterate (v, i, &ce); ++i)
+ if (TREE_TYPE (ce->index) == field_type)
break;
- if (i > 0)
+ if (i > 0 && i < vec_safe_length (v))
{
- elt = vref[i];
+ vec<constructor_elt, va_gc> &vref = *v;
+ constructor_elt elt = vref[i];
for (; i > 0; --i)
vref[i] = vref[i-1];
vref[0] = elt;
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a9e443b1407..b4f999af280 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1070,6 +1070,7 @@ See S/390 and zSeries Options.
-ffixed-@var{reg} -fexceptions @gol
-fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
-fasynchronous-unwind-tables @gol
+-fno-gnu-unique @gol
-finhibit-size-directive -finstrument-functions @gol
-finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
-finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
@@ -2674,9 +2675,10 @@ the compiler to never throw an exception.
@opindex Wnon-virtual-dtor
@opindex Wno-non-virtual-dtor
Warn when a class has virtual functions and an accessible non-virtual
-destructor, in which case it is possible but unsafe to delete
-an instance of a derived class through a pointer to the base class.
-This warning is also enabled if @option{-Weffc++} is specified.
+destructor itself or in an accessible polymorphic base class, in which
+case it is possible but unsafe to delete an instance of a derived
+class through a pointer to the class itself or base class. This
+warning is automatically enabled if @option{-Weffc++} is specified.
@item -Wreorder @r{(C++ and Objective-C++ only)}
@opindex Wreorder
@@ -2720,40 +2722,36 @@ The following @option{-W@dots{}} options are not affected by @option{-Wall}.
@opindex Weffc++
@opindex Wno-effc++
Warn about violations of the following style guidelines from Scott Meyers'
-@cite{Effective C++, Second Edition} book:
+@cite{Effective C++} series of books:
@itemize @bullet
@item
-Item 11: Define a copy constructor and an assignment operator for classes
+Define a copy constructor and an assignment operator for classes
with dynamically-allocated memory.
@item
-Item 12: Prefer initialization to assignment in constructors.
+Prefer initialization to assignment in constructors.
@item
-Item 14: Make destructors virtual in base classes.
+Have @code{operator=} return a reference to @code{*this}.
@item
-Item 15: Have @code{operator=} return a reference to @code{*this}.
+Don't try to return a reference when you must return an object.
@item
-Item 23: Don't try to return a reference when you must return an object.
-
-@end itemize
-
-Also warn about violations of the following style guidelines from
-Scott Meyers' @cite{More Effective C++} book:
-
-@itemize @bullet
-@item
-Item 6: Distinguish between prefix and postfix forms of increment and
+Distinguish between prefix and postfix forms of increment and
decrement operators.
@item
-Item 7: Never overload @code{&&}, @code{||}, or @code{,}.
+Never overload @code{&&}, @code{||}, or @code{,}.
@end itemize
+This option also enables @option{-Wnon-virtual-dtor}, which is also
+one of the effective C++ recommendations. However, the check is
+extended to warn about the lack of virtual destructor in accessible
+non-polymorphic bases classes too.
+
When selecting this option, be aware that the standard library
headers do not obey all of these guidelines; use @samp{grep -v}
to filter out those warnings.
@@ -12993,6 +12991,9 @@ instructions because of a hardware erratum. Skip instructions are
The second macro is only defined if @code{__AVR_HAVE_JMP_CALL__} is also
set.
+@item __AVR_ISA_RMW__
+The device has Read-Modify-Write instructions (XCH, LAC, LAS and LAT).
+
@item __AVR_SFR_OFFSET__=@var{offset}
Instructions that can address I/O special function registers directly
like @code{IN}, @code{OUT}, @code{SBI}, etc.@: may use a different
@@ -22020,6 +22021,20 @@ Generate unwind table in DWARF 2 format, if supported by target machine. The
table is exact at each instruction boundary, so it can be used for stack
unwinding from asynchronous events (such as debugger or garbage collector).
+@item -fno-gnu-unique
+@opindex fno-gnu-unique
+On systems with recent GNU assembler and C library, the C++ compiler
+uses the @code{STB_GNU_UNIQUE} binding to make sure that definitions
+of template static data members and static local variables in inline
+functions are unique even in the presence of @code{RTLD_LOCAL}; this
+is necessary to avoid problems with a library used by two different
+@code{RTLD_LOCAL} plugins depending on a definition in one of them and
+therefore disagreeing with the other one about the binding of the
+symbol. But this causes @code{dlclose} to be ignored for affected
+DSOs; if your program relies on reinitialization of a DSO via
+@code{dlclose} and @code{dlopen}, you can use
+@option{-fno-gnu-unique}.
+
@item -fpcc-struct-return
@opindex fpcc-struct-return
Return ``short'' @code{struct} and @code{union} values in memory like
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2b584a58853..67b37eba506 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -11325,8 +11325,18 @@ const_ok_for_output_1 (rtx *rtlp, void *data ATTRIBUTE_UNUSED)
return 1;
}
+ /* FIXME: Refer to PR60655. It is possible for simplification
+ of rtl expressions in var tracking to produce such expressions.
+ We should really identify / validate expressions
+ enclosed in CONST that can be handled by assemblers on various
+ targets and only handle legitimate cases here. */
if (GET_CODE (rtl) != SYMBOL_REF)
- return 0;
+ {
+ if (GET_CODE (rtl) == NOT)
+ return 1;
+
+ return 0;
+ }
if (CONSTANT_POOL_ADDRESS_P (rtl))
{
diff --git a/gcc/explow.c b/gcc/explow.c
index 4e2f70448fb..48e91a6444b 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1729,6 +1729,9 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
emit_stack_probe (addr);
}
}
+
+ /* Make sure nothing is scheduled before we are done. */
+ emit_insn (gen_blockage ());
}
/* Adjust the stack pointer by minus SIZE (an rtx for a number of bytes)
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 3d8cb5cdfc8..dcc84fd84fb 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,7 @@
+2014-04-04 Tobias Burnus <burnus@net-b.de>
+
+ * check.c (gfc_check_cmplx): Fix typo.
+
2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 119750aab8f..b83d9da148d 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -1278,12 +1278,12 @@ gfc_check_cmplx (gfc_expr *x, gfc_expr *y, gfc_expr *kind)
if (!kind && gfc_option.gfc_warn_conversion
&& x->ts.type == BT_REAL && x->ts.kind > gfc_default_real_kind)
gfc_warning_now ("Conversion from %s to default-kind COMPLEX(%d) at %L "
- "might loose precision, consider using the KIND argument",
+ "might lose precision, consider using the KIND argument",
gfc_typename (&x->ts), gfc_default_real_kind, &x->where);
else if (y && !kind && gfc_option.gfc_warn_conversion
&& y->ts.type == BT_REAL && y->ts.kind > gfc_default_real_kind)
gfc_warning_now ("Conversion from %s to default-kind COMPLEX(%d) at %L "
- "might loose precision, consider using the KIND argument",
+ "might lose precision, consider using the KIND argument",
gfc_typename (&y->ts), gfc_default_real_kind, &y->where);
return true;
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index be268cfbdec..59637f2d3cb 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -2714,11 +2714,11 @@ tree
gfc_get_function_type (gfc_symbol * sym)
{
tree type;
- vec<tree, va_gc> *typelist;
+ vec<tree, va_gc> *typelist = NULL;
gfc_formal_arglist *f;
gfc_symbol *arg;
- int alternate_return;
- bool is_varargs = true, recursive_type = false;
+ int alternate_return = 0;
+ bool is_varargs = true;
/* Make sure this symbol is a function, a subroutine or the main
program. */
@@ -2730,15 +2730,12 @@ gfc_get_function_type (gfc_symbol * sym)
if (sym->backend_decl == NULL)
sym->backend_decl = error_mark_node;
else if (sym->backend_decl == error_mark_node)
- recursive_type = true;
+ goto arg_type_list_done;
else if (sym->attr.proc_pointer)
return TREE_TYPE (TREE_TYPE (sym->backend_decl));
else
return TREE_TYPE (sym->backend_decl);
- alternate_return = 0;
- typelist = NULL;
-
if (sym->attr.entry_master)
/* Additional parameter for selecting an entry point. */
vec_safe_push (typelist, gfc_array_index_type);
@@ -2786,13 +2783,6 @@ gfc_get_function_type (gfc_symbol * sym)
if (arg->attr.flavor == FL_PROCEDURE)
{
- /* We don't know in the general case which argument causes
- recursion. But we know that it is a procedure. So we give up
- creating the procedure argument type list at the first
- procedure argument. */
- if (recursive_type)
- goto arg_type_list_done;
-
type = gfc_get_function_type (arg);
type = build_pointer_type (type);
}
@@ -2846,11 +2836,11 @@ gfc_get_function_type (gfc_symbol * sym)
|| sym->attr.if_source != IFSRC_UNKNOWN)
is_varargs = false;
-arg_type_list_done:
-
- if (!recursive_type && sym->backend_decl == error_mark_node)
+ if (sym->backend_decl == error_mark_node)
sym->backend_decl = NULL_TREE;
+arg_type_list_done:
+
if (alternate_return)
type = integer_type_node;
else if (!sym->attr.function || gfc_return_by_reference (sym))
@@ -2888,7 +2878,7 @@ arg_type_list_done:
else
type = gfc_sym_type (sym);
- if (is_varargs || recursive_type)
+ if (is_varargs)
type = build_varargs_function_type_vec (type, typelist);
else
type = build_function_type_vec (type, typelist);
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 2bb0b5fec1e..b852aa1bf22 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2502,6 +2502,65 @@ pre_insert_copies (void)
}
}
+struct set_data
+{
+ rtx insn;
+ const_rtx set;
+ int nsets;
+};
+
+/* Increment number of sets and record set in DATA. */
+
+static void
+record_set_data (rtx dest, const_rtx set, void *data)
+{
+ struct set_data *s = (struct set_data *)data;
+
+ if (GET_CODE (set) == SET)
+ {
+ /* We allow insns having multiple sets, where all but one are
+ dead as single set insns. In the common case only a single
+ set is present, so we want to avoid checking for REG_UNUSED
+ notes unless necessary. */
+ if (s->nsets == 1
+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
+ && !side_effects_p (s->set))
+ s->nsets = 0;
+
+ if (!s->nsets)
+ {
+ /* Record this set. */
+ s->nsets += 1;
+ s->set = set;
+ }
+ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
+ || side_effects_p (set))
+ s->nsets += 1;
+ }
+}
+
+static const_rtx
+single_set_gcse (rtx insn)
+{
+ struct set_data s;
+ rtx pattern;
+
+ gcc_assert (INSN_P (insn));
+
+ /* Optimize common case. */
+ pattern = PATTERN (insn);
+ if (GET_CODE (pattern) == SET)
+ return pattern;
+
+ s.insn = insn;
+ s.nsets = 0;
+ note_stores (pattern, record_set_data, &s);
+
+ /* Considered invariant insns have exactly one set. */
+ gcc_assert (s.nsets == 1);
+ return s.set;
+}
+
/* Emit move from SRC to DEST noting the equivalence with expression computed
in INSN. */
@@ -2509,7 +2568,8 @@ static rtx
gcse_emit_move_after (rtx dest, rtx src, rtx insn)
{
rtx new_rtx;
- rtx set = single_set (insn), set2;
+ const_rtx set = single_set_gcse (insn);
+ rtx set2;
rtx note;
rtx eqv = NULL_RTX;
@@ -3369,13 +3429,12 @@ hoist_code (void)
FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
{
rtx insn;
- rtx set;
+ const_rtx set;
gcc_assert (!occr->deleted_p);
insn = occr->insn;
- set = single_set (insn);
- gcc_assert (set);
+ set = single_set_gcse (insn);
/* Create a pseudo-reg to store the result of reaching
expressions into. Get the mode for the new pseudo
@@ -3456,10 +3515,8 @@ get_pressure_class_and_nregs (rtx insn, int *nregs)
{
rtx reg;
enum reg_class pressure_class;
- rtx set = single_set (insn);
+ const_rtx set = single_set_gcse (insn);
- /* Considered invariant insns have only one set. */
- gcc_assert (set != NULL_RTX);
reg = SET_DEST (set);
if (GET_CODE (reg) == SUBREG)
reg = SUBREG_REG (reg);
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c
index 2c4da474eff..da663d6fb79 100644
--- a/gcc/gimple-expr.c
+++ b/gcc/gimple-expr.c
@@ -527,6 +527,24 @@ create_tmp_reg (tree type, const char *prefix)
return tmp;
}
+/* Create a new temporary variable declaration of type TYPE by calling
+ create_tmp_var and if TYPE is a vector or a complex number, mark the new
+ temporary as gimple register. */
+
+tree
+create_tmp_reg_fn (struct function *fn, tree type, const char *prefix)
+{
+ tree tmp;
+
+ tmp = create_tmp_var_raw (type, prefix);
+ gimple_add_tmp_var_fn (fn, tmp);
+ if (TREE_CODE (type) == COMPLEX_TYPE
+ || TREE_CODE (type) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (tmp) = 1;
+
+ return tmp;
+}
+
/* ----- Expression related ----- */
diff --git a/gcc/gimple-expr.h b/gcc/gimple-expr.h
index ed8e338beca..3b6cda8441b 100644
--- a/gcc/gimple-expr.h
+++ b/gcc/gimple-expr.h
@@ -33,6 +33,7 @@ extern tree create_tmp_var_name (const char *);
extern tree create_tmp_var_raw (tree, const char *);
extern tree create_tmp_var (tree, const char *);
extern tree create_tmp_reg (tree, const char *);
+extern tree create_tmp_reg_fn (struct function *, tree, const char *);
extern void extract_ops_from_tree_1 (tree, enum tree_code *, tree *, tree *,
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 80fd786fdde..da3fb9fb35e 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -841,11 +841,6 @@ lower_builtin_posix_memalign (gimple_stmt_iterator *gsi)
void
record_vars_into (tree vars, tree fn)
{
- bool change_cfun = fn != current_function_decl;
-
- if (change_cfun)
- push_cfun (DECL_STRUCT_FUNCTION (fn));
-
for (; vars; vars = DECL_CHAIN (vars))
{
tree var = vars;
@@ -860,11 +855,8 @@ record_vars_into (tree vars, tree fn)
continue;
/* Record the variable. */
- add_local_decl (cfun, var);
+ add_local_decl (DECL_STRUCT_FUNCTION (fn), var);
}
-
- if (change_cfun)
- pop_cfun ();
}
diff --git a/gcc/gimple.c b/gcc/gimple.c
index e9851ca386a..2a278e41e9d 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -1464,9 +1464,12 @@ gimple_set_bb (gimple stmt, basic_block bb)
{
stmt->bb = bb;
+ if (gimple_code (stmt) != GIMPLE_LABEL)
+ return;
+
/* If the statement is a label, add the label to block-to-labels map
so that we can speed up edge creation for GIMPLE_GOTOs. */
- if (cfun->cfg && gimple_code (stmt) == GIMPLE_LABEL)
+ if (cfun->cfg)
{
tree t;
int uid;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ad2178dd914..744178420ab 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -627,6 +627,25 @@ force_constant_size (tree var)
/* Push the temporary variable TMP into the current binding. */
void
+gimple_add_tmp_var_fn (struct function *fn, tree tmp)
+{
+ gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp));
+
+ /* Later processing assumes that the object size is constant, which might
+ not be true at this point. Force the use of a constant upper bound in
+ this case. */
+ if (!tree_fits_uhwi_p (DECL_SIZE_UNIT (tmp)))
+ force_constant_size (tmp);
+
+ DECL_CONTEXT (tmp) = fn->decl;
+ DECL_SEEN_IN_BIND_EXPR_P (tmp) = 1;
+
+ record_vars_into (tmp, fn->decl);
+}
+
+/* Push the temporary variable TMP into the current binding. */
+
+void
gimple_add_tmp_var (tree tmp)
{
gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp));
diff --git a/gcc/gimplify.h b/gcc/gimplify.h
index 6bc0057c30e..47e72130add 100644
--- a/gcc/gimplify.h
+++ b/gcc/gimplify.h
@@ -60,6 +60,7 @@ extern tree get_formal_tmp_var (tree, gimple_seq *);
extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
extern void declare_vars (tree, gimple, bool);
extern void gimple_add_tmp_var (tree);
+extern void gimple_add_tmp_var_fn (struct function *, tree);
extern tree unshare_expr (tree);
extern tree unshare_expr_without_location (tree);
extern tree voidify_wrapper_expr (tree, tree);
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 1d7c7485f85..b5e4a8c8cb3 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -346,13 +346,10 @@ stmt_simple_for_scop_p (basic_block scop_entry, loop_p outermost_loop,
case GIMPLE_COND:
{
- tree op;
- ssa_op_iter op_iter;
- enum tree_code code = gimple_cond_code (stmt);
-
/* We can handle all binary comparisons. Inequalities are
also supported as they can be represented with union of
polyhedra. */
+ enum tree_code code = gimple_cond_code (stmt);
if (!(code == LT_EXPR
|| code == GT_EXPR
|| code == LE_EXPR
@@ -361,11 +358,14 @@ stmt_simple_for_scop_p (basic_block scop_entry, loop_p outermost_loop,
|| code == NE_EXPR))
return false;
- FOR_EACH_SSA_TREE_OPERAND (op, stmt, op_iter, SSA_OP_ALL_USES)
- if (!graphite_can_represent_expr (scop_entry, loop, op)
- /* We can not handle REAL_TYPE. Failed for pr39260. */
- || TREE_CODE (TREE_TYPE (op)) == REAL_TYPE)
- return false;
+ for (unsigned i = 0; i < 2; ++i)
+ {
+ tree op = gimple_op (stmt, i);
+ if (!graphite_can_represent_expr (scop_entry, loop, op)
+ /* We can not handle REAL_TYPE. Failed for pr39260. */
+ || TREE_CODE (TREE_TYPE (op)) == REAL_TYPE)
+ return false;
+ }
return true;
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index d4a1bb2df9a..28447e4b6fe 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2250,6 +2250,7 @@ rewrite_phi_out_of_ssa (scop_p scop, gimple_stmt_iterator *psi)
/* Avoid the insertion of code in the loop latch to please the
pattern matching of the vectorizer. */
if (TREE_CODE (arg) == SSA_NAME
+ && !SSA_NAME_IS_DEFAULT_DEF (arg)
&& e->src == bb->loop_father->latch)
insert_out_of_ssa_copy (scop, zero_dim_array, arg,
SSA_NAME_DEF_STMT (arg));
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index e0d467497fa..2d66e5cab6a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Instruction scheduling pass. This file, along with sched-deps.c,
- contains the generic parts. The actual entry point is found for
+ contains the generic parts. The actual entry point for
the normal instruction scheduling pass is found in sched-rgn.c.
We compute insn priorities based on data dependencies. Flow
@@ -77,12 +77,12 @@ along with GCC; see the file COPYING3. If not see
Before reload, an extended analysis of interblock data dependences
is required for interblock scheduling. This is performed in
- compute_block_backward_dependences ().
+ compute_block_dependences ().
Dependencies set up by memory references are treated in exactly the
same way as other dependencies, by using insn backward dependences
INSN_BACK_DEPS. INSN_BACK_DEPS are translated into forward dependences
- INSN_FORW_DEPS the purpose of forward list scheduling.
+ INSN_FORW_DEPS for the purpose of forward list scheduling.
Having optimized the critical path, we may have also unduly
extended the lifetimes of some registers. If an operation requires
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index c84a26dba9a..03a6c5b5d3b 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -650,7 +650,7 @@ maybe_record_node (vec <cgraph_node *> &nodes,
else if (completep
&& !type_in_anonymous_namespace_p
(method_class_type (TREE_TYPE (target))))
- *completep = true;
+ *completep = false;
}
/* See if BINFO's type match OUTER_TYPE. If so, lookup
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index b2e0285462c..a45aab118fd 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -184,7 +184,7 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
freq_scale = e->frequency;
n = cgraph_clone_node (e->callee, e->callee->decl,
e->count, freq_scale, update_original,
- vNULL, true, inlining_into);
+ vNULL, true, inlining_into, NULL);
cgraph_redirect_edge_callee (e, n);
}
}
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 1e1e1183b86..40518194040 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1383,7 +1383,7 @@ recursive_inlining (struct cgraph_edge *edge,
/* We need original clone to copy around. */
master_clone = cgraph_clone_node (node, node->decl,
node->count, CGRAPH_FREQ_BASE,
- false, vNULL, true, NULL);
+ false, vNULL, true, NULL, NULL);
for (e = master_clone->callees; e; e = e->next_callee)
if (!e->inline_failed)
clone_inlined_nodes (e, true, false, NULL, CGRAPH_FREQ_BASE);
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 435fff0d4cb..c76687604dd 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -139,7 +139,10 @@ process_references (struct ipa_ref_list *list,
if (node->definition && !node->in_other_partition
&& ((!DECL_EXTERNAL (node->decl) || node->alias)
- || (before_inlining_p
+ || (((before_inlining_p
+ && (cgraph_state < CGRAPH_STATE_IPA_SSA
+ || !lookup_attribute ("always_inline",
+ DECL_ATTRIBUTES (node->decl)))))
/* We use variable constructors during late complation for
constant folding. Keep references alive so partitioning
knows about potential references. */
@@ -191,7 +194,10 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
/* Prior inlining, keep alive bodies of possible targets for
devirtualization. */
if (n->definition
- && before_inlining_p)
+ && (before_inlining_p
+ && (cgraph_state < CGRAPH_STATE_IPA_SSA
+ || !lookup_attribute ("always_inline",
+ DECL_ATTRIBUTES (n->decl)))))
pointer_set_insert (reachable, n);
/* Even after inlining we want to keep the possible targets in the
@@ -491,6 +497,12 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
node->alias = false;
node->thunk.thunk_p = false;
node->weakref = false;
+ /* After early inlining we drop always_inline attributes on
+ bodies of functions that are still referenced (have their
+ address taken). */
+ DECL_ATTRIBUTES (node->decl)
+ = remove_attribute ("always_inline",
+ DECL_ATTRIBUTES (node->decl));
if (!node->in_other_partition)
node->local.local = false;
cgraph_node_remove_callees (node);
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 60ae1320843..173067f65cf 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -1001,6 +1001,9 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->thunk.thunk_p = bp_unpack_value (bp, 1);
node->resolution = bp_unpack_enum (bp, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN);
+ gcc_assert (flag_ltrans
+ || (!node->in_other_partition
+ && !node->used_from_other_partition));
}
/* Return string alias is alias of. */
@@ -1042,7 +1045,7 @@ input_node (struct lto_file_decl_data *file_data,
{
node = cgraph_clone_node (cgraph (nodes[clone_ref]), fn_decl,
0, CGRAPH_FREQ_BASE, false,
- vNULL, false, NULL);
+ vNULL, false, NULL, NULL);
}
else
{
@@ -1169,6 +1172,9 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->same_comdat_group = (symtab_node *) (intptr_t) ref;
node->resolution = streamer_read_enum (ib, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN);
+ gcc_assert (flag_ltrans
+ || (!node->in_other_partition
+ && !node->used_from_other_partition));
return node;
}
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 3238ab8109c..e19b11558d9 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1365,8 +1365,7 @@ lto_data_in_create (struct lto_file_decl_data *file_data, const char *strings,
data_in->strings = strings;
data_in->strings_len = len;
data_in->globals_resolution = resolutions;
- data_in->reader_cache = streamer_tree_cache_create (false, false);
-
+ data_in->reader_cache = streamer_tree_cache_create (false, false, true);
return data_in;
}
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 0f37f1c2422..69b5a79e539 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -79,7 +79,7 @@ create_output_block (enum lto_section_type section_type)
ob->decl_state = lto_get_out_decl_state ();
ob->main_stream = XCNEW (struct lto_output_stream);
ob->string_stream = XCNEW (struct lto_output_stream);
- ob->writer_cache = streamer_tree_cache_create (!flag_wpa, true);
+ ob->writer_cache = streamer_tree_cache_create (!flag_wpa, true, false);
if (section_type == LTO_section_function_body)
ob->cfg_stream = XCNEW (struct lto_output_stream);
@@ -1277,7 +1277,6 @@ DFS_write_tree (struct output_block *ob, sccs *from_state,
??? We still wrap these in LTO_tree_scc so at the
input side we can properly identify the tree we want
to ultimatively return. */
- size_t old_len = ob->writer_cache->nodes.length ();
if (size == 1)
lto_output_tree_1 (ob, expr, scc_hash, ref_p, this_ref_p);
else
@@ -1315,7 +1314,6 @@ DFS_write_tree (struct output_block *ob, sccs *from_state,
streamer_write_zero (ob);
}
}
- gcc_assert (old_len + size == ob->writer_cache->nodes.length ());
/* Finally truncate the vector. */
sccstack.truncate (first);
@@ -2423,10 +2421,18 @@ produce_asm_for_decls (void)
gcc_assert (!alias_pairs);
- /* Write the global symbols. */
+ /* Get rid of the global decl state hash tables to save some memory. */
out_state = lto_get_out_decl_state ();
- num_fns = lto_function_decl_states.length ();
+ for (int i = 0; i < LTO_N_DECL_STREAMS; i++)
+ if (out_state->streams[i].tree_hash_table)
+ {
+ delete out_state->streams[i].tree_hash_table;
+ out_state->streams[i].tree_hash_table = NULL;
+ }
+
+ /* Write the global symbols. */
lto_output_decl_state_streams (ob, out_state);
+ num_fns = lto_function_decl_states.length ();
for (idx = 0; idx < num_fns; idx++)
{
fn_out_state =
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1ffa4b96ba6..bfc27226e98 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,8 +1,152 @@
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * gcc.dg/graphite/pr60785.c: New testcase.
+
+2014-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/60602
+ * gcc.c-torture/compile/pr28865.c: XFAIL on sparc*-*-solaris2.9*
+ with as at -O0.
+
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/warn/Wnvdtor-2.C: Add more cases.
+ * g++.dg/warn/Wnvdtor-3.C: Likewise.
+ * g++.dg/warn/Wnvdtor-4.C: Likewise.
+
+2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/test_raise_from_pure.adb: UnXFAIL for ARM.
+
+2014-04-07 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/60609
+ * g++.dg/torture/pr60609.C: New test.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60766
+ * gcc.dg/torture/pr60766.c: New testcase.
+
+2014-04-07 Jason Merrill <jason@redhat.com>
+
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
+ * lib/target-supports.exp (add_options_for_dlopen): New.
+ (check_effective_target_dlopen): Use it.
+
+2014-04-07 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * gcc.target/arm/pr60657.c: Fix missing curly brace.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60750
+ * g++.dg/torture/pr60750.C: New testcase.
+ * gcc.dg/tree-ssa/20040517-1.c: Adjust.
+
+2014-04-06 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.c-torture/compile/pr60655-1.c: Use __SIZE_TYPE__ for size_t.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/60671
+ g++.dg/pr49718.C: Adjust scan-assembler-times for hppa*-*-hpux*.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/60672
+ * g++.dg/cpp1y/auto-fn25.C: Require lto.
+
+ * gcc.dg/atomic/stdatomic-flag.c: xfail on hppa*-*-hpux*.
+
+2014-04-05 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gfortran.dg/warn_conversion_4.f90: Adjust test.
+
+2014-05-04 Pitchumani Sivanupandi <Pitchumani.S@atmel.com>
+
+ * gcc.target/avr/dev-specific-rmw.c: New test.
+
+2014-04-04 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60656
+ * gcc.dg/vect/pr60656.c: New test.
+
+2014-04-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
+ optimization.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+
+2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58207
+ * g++.dg/cpp0x/constexpr-ice15.C: New.
+
+2014-04-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/59626
+ testcase by Richard Biener
+ * gcc.dg/lto/pr59626_0.c: New testcase.
+ * gcc.dg/lto/pr59626_1.c: New testcase.
+
+2014-04-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * gcc.c-torture/compile/pr60655-1.c: New test.
+
+2014-04-04 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/60640
+ * g++.dg/ipa/pr60640-1.C: New test.
+ * g++.dg/ipa/pr60640-2.C: Likewise.
+ * g++.dg/ipa/pr60640-3.C: Likewise.
+ * g++.dg/ipa/pr60640-4.C: Likewise.
+
+2014-04-04 Jeff Law <law@redhat.com>
+
+ PR target/60657
+ * gcc.target/arm/pr60657.c: New test.
+
+2014-04-04 Richard Biener <rguenther@suse.de>
+
+ PR ipa/60746
+ * g++.dg/torture/pr60746.C: New testcase.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * g++.old-deja/g++.robertl/eb121.C: Adjust.
+ * g++.old-deja/g++.jason/overload21.C: Likewise.
+ * g++.old-deja/g++.law/init5.C: Likewise.
+
+2014-04-03 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60505
+ * gcc.dg/vect/pr60505.c: New test.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60740
+ * gcc.dg/graphite/pr60740.c: New testcase.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case.
+ * g++.dg/warn/Wnvdtor-2.C: New.
+ * g++.dg/warn/Wnvdtor-3.C: New.
+ * g++.dg/warn/Wnvdtor-4.C: New.
+ * g++.dg/warn/Weff1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-2.C: Delete.
+
2014-04-02 Jan Hubicka <hubicka@ucw.cz>
PR ipa/60659
* testsuite/g++.dg/torture/pr60659.C: New testcase.
-
+
2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/60733
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
new file mode 100644
index 00000000000..576fd415085
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
@@ -0,0 +1,12 @@
+// PR c++/58207
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ virtual bool foo ();
+};
+
+struct B : public A
+{
+ constexpr B () : A (&::n) {} // { dg-error "declared" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
index 628a685f722..24680f16d05 100644
--- a/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
@@ -1,6 +1,7 @@
// PR c++/60574
-// { dg-options "-flto" }
// { dg-do compile { target c++1y } }
+// { dg-require-effective-target lto }
+// { dg-options "-flto" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc b/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc
new file mode 100644
index 00000000000..cede4839bc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc
@@ -0,0 +1,9 @@
+// { dg-options "-fno-gnu-unique" }
+
+// A static variable in an inline function uses STB_GNU_UNIQUE normally.
+inline int foo() { static int i; return ++i; }
+
+extern "C" int fn()
+{
+ return foo();
+}
diff --git a/gcc/testsuite/g++.dg/dso/dlclose1.C b/gcc/testsuite/g++.dg/dso/dlclose1.C
new file mode 100644
index 00000000000..95b6fea1f54
--- /dev/null
+++ b/gcc/testsuite/g++.dg/dso/dlclose1.C
@@ -0,0 +1,30 @@
+// PR c++/60731
+// { dg-do run { target dlopen } }
+// { dg-add-options dlopen }
+// { dg-build-dso "dlclose1-dso.cc" }
+
+#include <dlfcn.h>
+extern "C" void abort();
+extern "C" int printf (const char *, ...);
+
+// Open and close the DSO for each call so that statics are reinitialized.
+int call()
+{
+ void *h = dlopen ("./dlclose1-dso.so", RTLD_NOW);
+ if (!h) { printf ("dlopen failed: %s\n", dlerror()); abort(); }
+ int (*fn)() = (int(*)())dlsym (h, "fn");
+ if (!fn) { printf ("dlsym failed: %s\n", dlerror()); abort(); }
+ int r = fn();
+ dlclose (h);
+ return r;
+}
+
+int main() {
+ int i = call();
+ int j = call();
+ if (i != j)
+ {
+ printf ("mismatch: %d != %d\n", i, j);
+ abort();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla14.C b/gcc/testsuite/g++.dg/ext/vla14.C
new file mode 100644
index 00000000000..278cb63b938
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla14.C
@@ -0,0 +1,23 @@
+// PR c++/21113
+// { dg-options "" }
+
+void
+f (int n)
+{
+ goto label; // { dg-error "from here" }
+ int a[n]; // { dg-error "crosses initialization" }
+label: // { dg-error "jump to label" }
+ ;
+}
+
+void
+g (int n)
+{
+ switch (1)
+ {
+ case 1:
+ int (*a)[n]; // { dg-error "crosses initialization" }
+ default: // { dg-error "jump to case label" }
+ ;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla15.C b/gcc/testsuite/g++.dg/ext/vla15.C
new file mode 100644
index 00000000000..feeb49ff280
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla15.C
@@ -0,0 +1,20 @@
+// PR c++/44613
+// { dg-do run }
+// { dg-options "" }
+
+void *volatile p;
+
+int
+main (void)
+{
+ int n = 0;
+ lab:;
+ int x[n % 1000 + 1];
+ x[0] = 1;
+ x[n % 1000] = 2;
+ p = x;
+ n++;
+ if (n < 1000000)
+ goto lab;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-1.C b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
new file mode 100644
index 00000000000..7a0b91893f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+class ASN1Object
+{
+public:
+ virtual ~ASN1Object ();
+};
+class A
+{
+ virtual unsigned m_fn1 () const;
+};
+class B
+{
+public:
+ ASN1Object Element;
+ virtual unsigned m_fn1 (bool) const;
+};
+template <class BASE> class C : public BASE
+{
+};
+
+class D : ASN1Object, public B
+{
+};
+class G : public D
+{
+ unsigned m_fn1 (bool) const {}
+};
+class F : A
+{
+public:
+ F (A);
+ unsigned m_fn1 () const
+ {
+ int a;
+ a = m_fn2 ().m_fn1 (0);
+ return a;
+ }
+ const B &m_fn2 () const { return m_groupParameters; }
+ C<G> m_groupParameters;
+};
+template <class D> void BenchMarkKeyAgreement (int *, int *, int)
+{
+ A f;
+ D d (f);
+}
+
+void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); }
+
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-2.C b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
new file mode 100644
index 00000000000..c6e614cc004
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+struct B { virtual unsigned f () const; };
+struct C { virtual void f (); };
+struct F { virtual unsigned f (bool) const; ~F (); };
+struct J : C, F {};
+struct G : J { unsigned f (bool) const { return 0; } };
+struct H : B
+{
+ H (int);
+ unsigned f () const { return ((const F &) h).f (0); }
+ G h;
+};
+H h (0);
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-3.C b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
new file mode 100644
index 00000000000..21b1f58a040
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
@@ -0,0 +1,81 @@
+// { dg-do run }
+// { dg-options "-O3" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual A * foo (int p) = 0;
+};
+
+struct B;
+static B * __attribute__ ((noinline, noclone)) get_a_B ();
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual B * foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+
+ return get_a_B ();
+ }
+};
+
+
+struct B gb1 (1111), gb2 (2);
+static B * __attribute__ ((noinline, noclone))
+get_a_B ()
+{
+ return &gb1;
+}
+
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb2;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ struct A *r = p->foo (4);
+ if (r->fi != 1111)
+ abort ();
+ if (go != 22)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-4.C b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
new file mode 100644
index 00000000000..eb9eb627f85
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
@@ -0,0 +1,85 @@
+// { dg-do run }
+// { dg-options "-O3 -fdump-ipa-cp" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual void foo (int p) = 0;
+};
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual void foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+ }
+};
+
+
+struct B gb (2);
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+static void __attribute__ ((noinline, noclone))
+bar ()
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+
+ bar ();
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "Thunk fixed offset" 2 "cp"} } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/pr49718.C b/gcc/testsuite/g++.dg/pr49718.C
index d7f2710a994..b1cc5deb7ac 100644
--- a/gcc/testsuite/g++.dg/pr49718.C
+++ b/gcc/testsuite/g++.dg/pr49718.C
@@ -2,7 +2,8 @@
/* { dg-options "-O2 -finstrument-functions" } */
/* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */
/* { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } } */
-/* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1} } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1 { target { ! { hppa*-*-hpux* } } } } } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter,%r" 1 { target hppa*-*-hpux* } } } */
#define NOINSTR __attribute__((no_instrument_function))
diff --git a/gcc/testsuite/g++.dg/torture/pr60609.C b/gcc/testsuite/g++.dg/torture/pr60609.C
new file mode 100644
index 00000000000..9ddec0b601d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60609.C
@@ -0,0 +1,252 @@
+/* { dg-do assemble } */
+
+class exception
+{
+};
+class bad_alloc:exception
+{
+};
+class logic_error:exception
+{
+};
+class domain_error:logic_error
+{
+};
+class invalid_argument:logic_error
+{
+};
+class length_error:logic_error
+{
+};
+class overflow_error:exception
+{
+};
+typedef int mpz_t[];
+template < class > class __gmp_expr;
+template <> class __gmp_expr < mpz_t >
+{
+ ~__gmp_expr ();
+};
+
+class PIP_Solution_Node;
+class internal_exception
+{
+ ~internal_exception ();
+};
+class not_an_integer:internal_exception
+{
+};
+class not_a_variable:internal_exception
+{
+};
+class not_an_optimization_mode:internal_exception
+{
+};
+class not_a_bounded_integer_type_width:internal_exception
+{
+};
+class not_a_bounded_integer_type_representation:internal_exception
+{
+};
+class not_a_bounded_integer_type_overflow:internal_exception
+{
+};
+class not_a_complexity_class:internal_exception
+{
+};
+class not_a_control_parameter_name:internal_exception
+{
+};
+class not_a_control_parameter_value:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_name:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_value:internal_exception
+{
+};
+class not_a_relation:internal_exception
+{
+};
+class ppl_handle_mismatch:internal_exception
+{
+};
+class timeout_exception
+{
+ ~timeout_exception ();
+};
+class deterministic_timeout_exception:timeout_exception
+{
+};
+void __assert_fail (const char *, const char *, int, int *)
+__attribute__ ((__noreturn__));
+void PL_get_pointer (void *);
+int Prolog_is_address ();
+inline int
+Prolog_get_address (void **p1)
+{
+ Prolog_is_address ()? static_cast <
+ void >(0) : __assert_fail ("Prolog_is_address", "./swi_cfli.hh", 0, 0);
+ PL_get_pointer (p1);
+ return 0;
+}
+
+class non_linear:internal_exception
+{
+};
+class not_unsigned_integer:internal_exception
+{
+};
+class not_universe_or_empty:internal_exception
+{
+};
+class not_a_nil_terminated_list:internal_exception
+{
+};
+class PPL_integer_out_of_range
+{
+ __gmp_expr < mpz_t > n;
+};
+void handle_exception ();
+template < typename T > T * term_to_handle (int, const char *)
+{
+ if (Prolog_is_address ())
+ {
+ void *p;
+ Prolog_get_address (&p);
+ return static_cast < T * >(0);
+ }
+ throw;
+}
+
+void
+ppl_new_MIP_Problem_from_MIP_Problem ()
+try
+{
+ term_to_handle < int >(0, "ppl_new_MIP_Problem_from_MIP_Problem/2");
+}
+
+catch (exception &)
+{
+}
+
+int
+ppl_PIP_Tree_Node_parametric_values ()
+{
+ try
+ {
+ PIP_Solution_Node *a = term_to_handle < PIP_Solution_Node > (0, 0);
+ (void)a;
+ return 1;
+ }
+ catch (internal_exception &)
+ {
+ }
+ catch (not_unsigned_integer &)
+ {
+ handle_exception ();
+ }
+ catch (non_linear &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_variable &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_integer &)
+ {
+ handle_exception ();
+ }
+ catch (ppl_handle_mismatch &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_optimization_mode &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_complexity_class &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_width &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_representation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_overflow &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_universe_or_empty &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_relation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_nil_terminated_list &)
+ {
+ handle_exception ();
+ }
+ catch (PPL_integer_out_of_range &)
+ {
+ handle_exception ();
+ }
+ catch (int &)
+ {
+ } catch (timeout_exception &)
+ {
+ handle_exception ();
+ } catch (deterministic_timeout_exception &)
+ {
+ handle_exception ();
+ } catch (overflow_error &)
+ {
+ handle_exception ();
+ } catch (domain_error &)
+ {
+ handle_exception ();
+ } catch (length_error &)
+ {
+ handle_exception ();
+ } catch (invalid_argument &)
+ {
+ handle_exception ();
+ } catch (logic_error &)
+ {
+ handle_exception ();
+ } catch (bad_alloc &)
+ {
+ handle_exception ();
+ } catch (exception &)
+ {
+ handle_exception ();
+ } catch ( ...)
+ {
+ handle_exception ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60746.C b/gcc/testsuite/g++.dg/torture/pr60746.C
new file mode 100644
index 00000000000..7ce6ebe6bc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60746.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+
+class One
+{
+public:
+ virtual unsigned long getSize () const;
+};
+
+class Two
+{
+ virtual int run ();
+};
+
+int
+Two::run ()
+{
+ One list_arry[5][2];
+ int orig = 0;
+ if (list_arry[3][orig].getSize () > 0
+ || list_arry[4][orig].getSize () > 0)
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60750.C b/gcc/testsuite/g++.dg/torture/pr60750.C
new file mode 100644
index 00000000000..a344bd764a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60750.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// { dg-options "-std=c++11" }
+
+#include <string>
+#include <stdexcept>
+
+const std::string err_prefix = "Problem: ";
+void thrower (std::string msg)
+{
+ throw std::runtime_error(err_prefix + std::move(msg));
+}
+
+int main(int argc, char **argv)
+{
+ try {
+ std::string base = "hello";
+ thrower(std::move(base));
+ } catch (const std::runtime_error &e) {
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Weff1.C b/gcc/testsuite/g++.dg/warn/Weff1.C
deleted file mode 100644
index a00dc29bf5f..00000000000
--- a/gcc/testsuite/g++.dg/warn/Weff1.C
+++ /dev/null
@@ -1,5 +0,0 @@
-// { dg-options "-Weffc++" }
-
-struct S {};
-/* Base classes should have virtual destructors. */
-struct T : public S {}; // { dg-warning "" }
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
index d40de3d7c1a..9f2e4bea43b 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
@@ -6,18 +6,18 @@
// destructor, in which case it would be possible but unsafe to delete
// an instance of a derived class through a pointer to the base class.
-struct A // { dg-bogus "non-virtual destructor" }
+struct A
{
protected:
- ~A();
+ ~A(); // inaccessible - no warning
public:
virtual void f() = 0;
};
-struct B // { dg-bogus "non-virtual destructor" }
+struct B
{
private:
- ~B();
+ ~B(); // inaccessible - no warning
public:
virtual void f() = 0;
};
@@ -52,3 +52,25 @@ private:
public:
virtual void f() = 0;
};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
new file mode 100644
index 00000000000..e83134b062b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct C // { dg-warning "non-virtual destructor" }
+{
+ virtual void f() = 0;
+};
+
+struct D // { dg-warning "non-virtual destructor" }
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F // { dg-warning "non-virtual destructor" }
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G // { dg-warning "non-virtual destructor" }
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H // { dg-warning "accessible non-virtual destructor" }
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
new file mode 100644
index 00000000000..dd6d9d7689e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++ -Wno-non-virtual-dtor" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A();
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B();
+public:
+ virtual void f() = 0;
+};
+
+struct C
+{
+ virtual void f() = 0;
+};
+
+struct D
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K
+{
+ virtual void k ();
+};
+
+struct L1 : K
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor.C b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
index b04fdcbe6b1..f03cff5b31c 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
@@ -8,3 +8,4 @@ extern "Java"
virtual void bar( void);
};
}
+
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
deleted file mode 100644
index aa5530fff7f..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
+++ /dev/null
@@ -1,21 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bahamian {
-public:
- bahamian ();
- ~bahamian ();
-};
-
-class miami : public bahamian // { dg-warning "" } // WARNING -
-{
-public:
- miami ();
- ~miami ();
-};
-
-
-
-
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
deleted file mode 100644
index 28317973127..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bermuda { // { dg-warning "" } // WARNING -
-public:
- virtual int func1(int);
- ~bermuda();
-};
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
index 72397930367..125aee0dbfc 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
struct X {
- void f (int = 4, char = 'r'); // { dg-error "previous specification" }
+ void f (int = 4, char = 'r'); // { dg-message "previous specification" }
void g (int = 4, char = 'r'); // { dg-message "previous specification" }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init5.C b/gcc/testsuite/g++.old-deja/g++.law/init5.C
index c1d647b1b05..7ed89e21924 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init5.C
@@ -11,8 +11,8 @@ extern int fred( int);
class X {
public :
- void f( int = fred( 0) ) ; // { dg-error "" } previous spec
+ void f( int = fred( 0) ) ; // { dg-message "previous spec" }
} ;
-void X::f( int x = fred( 0) ) {// { dg-error "" } .*
+void X::f( int x = fred( 0) ) { // { dg-error "default argument" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
index e01d7478838..036c8d5152a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
@@ -3,7 +3,7 @@ class A {
private:
int i1_;
public:
- void f(int const i1 = 1); // { dg-error "previous specification" }
+ void f(int const i1 = 1); // { dg-message "previous specification" }
};
void
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr28865.c b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
index aa6ae078aca..4ad0f5c4306 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr28865.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
@@ -1,3 +1,5 @@
+/* { dg-xfail-if "PR target/60602" { sparc*-*-solaris2.9* && { ! gas } } { "-O0" } } */
+
struct var_len
{
int field1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
new file mode 100644
index 00000000000..6f84f6e4ea0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
@@ -0,0 +1,31 @@
+/* { dg-options "-fdata-sections" } */
+
+typedef unsigned char unit;
+typedef unit *unitptr;
+extern short global_precision;
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+short mp_compare(const unit* r1, const unit* r2)
+{
+ register short precision;
+ precision = global_precision;
+ (r1) = ((r1)+(precision)-1);
+ (r2) = ((r2)+(precision)-1);
+ do
+ { if (*r1 < *r2)
+ return(-1);
+ if (*((r1)--) > *((r2)--))
+ return(1);
+ } while (--precision);
+}
+
+static unit modulus[((1280+(2*8))/8)];
+static unit d_data[((1280+(2*8))/8)*2];
+
+int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
+{
+ unitptr d = d_data;
+ while (mp_compare(d,modulus) > 0)
+ memcpy((void*)(prod), (const void*)(d), (global_precision));
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
index 32f9e9bb631..c1a63f1b3aa 100644
--- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
@@ -1,5 +1,5 @@
/* Test atomic_flag routines for existence and execution. */
-/* { dg-do run } */
+/* { dg-do run { xfail hppa*-*-hpux* } } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdatomic.h>
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-6.c b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
index 024ebf1edf6..6f0c782a856 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-6.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
@@ -3,6 +3,10 @@
/* { dg-options "-O -fdump-rtl-combine" } */
/* { dg-options "-O -fdump-rtl-combine -march=z900" { target s390-*-* } } */
+/* The test intentionally returns 1/2 instead of the obvious 0/1 to
+ prevent GCC from calculating the return value with arithmetic
+ instead of a comparison. */
+
#include <stdint.h>
#define BS(X) __builtin_bswap32(X)
@@ -11,28 +15,28 @@ int foo1 (uint32_t a)
{
if (BS (a) == 0xA0000)
return 1;
- return 0;
+ return 2;
}
int foo2 (uint32_t a)
{
if (BS (a) != 0xA0000)
return 1;
- return 0;
+ return 2;
}
int foo3 (uint32_t a, uint32_t b)
{
if (BS (a) == BS (b))
return 1;
- return 0;
+ return 2;
}
int foo4 (uint32_t a, uint32_t b)
{
if (BS (a) != BS (b))
return 1;
- return 0;
+ return 2;
}
/* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-7.c b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
index 399b825ac43..0eecdd8bea5 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-7.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
@@ -3,6 +3,10 @@
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O -fdump-rtl-combine" } */
+/* The test intentionally returns 1/2 instead of the obvious 0/1 to
+ prevent GCC from calculating the return value with arithmetic
+ instead of a comparison. */
+
#include <stdint.h>
#define BS(X) __builtin_bswap64(X)
@@ -11,28 +15,28 @@ int foo1 (uint64_t a)
{
if (BS (a) == 0xA00000000)
return 1;
- return 0;
+ return 2;
}
int foo2 (uint64_t a)
{
if (BS (a) != 0xA00000000)
return 1;
- return 0;
+ return 2;
}
int foo3 (uint64_t a, uint64_t b)
{
if (BS (a) == BS (b))
return 1;
- return 0;
+ return 2;
}
int foo4 (uint64_t a, uint64_t b)
{
if (BS (a) != BS (b))
return 1;
- return 0;
+ return 2;
}
/* { dg-final { scan-rtl-dump-not "bswapdi" "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60740.c b/gcc/testsuite/gcc.dg/graphite/pr60740.c
new file mode 100644
index 00000000000..5b7c1802236
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60740.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+int **db6 = 0;
+
+void
+k26(void)
+{
+ static int geb = 0;
+ int *a22 = &geb;
+ int **l30 = &a22;
+ int *c4b;
+ int ndf;
+ for (ndf = 0; ndf <= 1; ++ndf)
+ *c4b = (db6 == l30) && (*a22)--;
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60785.c b/gcc/testsuite/gcc.dg/graphite/pr60785.c
new file mode 100644
index 00000000000..87c1c685b0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60785.c
@@ -0,0 +1,27 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+static int
+aqc(void)
+{
+ return 1;
+}
+
+void
+gkd(void)
+{
+ int wu0;
+ static int b1y;
+ static int gw2;
+ static int *ydw = &gw2;
+ static int **m3l = &ydw;
+ **m3l = 0;
+ for (b1y = 0; b1y < 1; ++b1y)
+ {
+ int *cpj = &gw2;
+ if (*ydw |= aqc())
+ {
+ *cpj = 0;
+ *ydw = wu0;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_0.c b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
new file mode 100644
index 00000000000..752982fb506
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+
+int __atoi (const char *) __asm__("atoi");
+extern inline __attribute__((always_inline,gnu_inline))
+int atoi (const char *x)
+{
+ return __atoi (x);
+}
+
+int bar (int (*)(const char *));
+
+int main()
+{
+ return bar (atoi);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_1.c b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
new file mode 100644
index 00000000000..9b3fa1d2e36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
@@ -0,0 +1,4 @@
+int bar (int (*fn)(const char *))
+{
+ return fn ("0");
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60766.c b/gcc/testsuite/gcc.dg/torture/pr60766.c
new file mode 100644
index 00000000000..6f16e3b7408
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60766.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+int m = 9;
+
+int main()
+{
+ int n, x;
+
+ n = m;
+ for (x = 0; x <= n; x++)
+ if (n == x + (x + 1) + (x + 2))
+ return 0;
+
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
index 99b27ce02f1..b49cf648c7d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
@@ -16,6 +16,7 @@ void bar (void)
/* We used to treat malloc functions like pure and const functions, but
malloc functions may clobber global memory. Only the function result
does not alias any other pointer.
- Hence, we must have a VDEF for a before and after the call to foo(). */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias"} } */
+ Hence, we must have a VDEF for a before and after the call to foo().
+ And one after the call to abort(). */
+/* { dg-final { scan-tree-dump-times "VDEF" 3 "alias"} } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60505.c b/gcc/testsuite/gcc.dg/vect/pr60505.c
new file mode 100644
index 00000000000..694051320ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60505.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wall -Werror" } */
+
+void foo(char *in, char *out, int num)
+{
+ int i;
+ char ovec[16] = {0};
+
+ for(i = 0; i < num ; ++i)
+ out[i] = (ovec[i] = in[i]);
+ out[num] = ovec[num/2];
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c
new file mode 100644
index 00000000000..ebaab62b97c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c
@@ -0,0 +1,45 @@
+/* { dg-require-effective-target vect_int } */
+
+#include "tree-vect.h"
+
+__attribute__ ((noinline)) long
+foo ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P*P*P;
+ }
+ return s;
+}
+
+long
+bar ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P*P*P;
+ __asm__ volatile ("");
+ }
+ return s;
+}
+
+int main()
+{
+ if (foo () != bar ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c
new file mode 100644
index 00000000000..66355c39a94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60657.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a" } */
+
+
+void foo (void);
+
+void
+bar (int x, int y)
+{
+ y = 9999;
+ if (x & (1 << y))
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
new file mode 100644
index 00000000000..0a8393e4966
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
@@ -0,0 +1,13 @@
+/* Verify that rmw instructions supported */
+/* { dg-do assemble } */
+
+int main()
+{
+ #ifdef __AVR_ISA_RMW__
+ __asm("xch Z, r12");
+ __asm("las Z, r12");
+ __asm("lac Z, r12");
+ __asm("lat Z, r12");
+ #endif
+ return 0;
+}
diff --git a/gcc/testsuite/gfortran.dg/warn_conversion_4.f90 b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
index f911741f534..3d1b12582b3 100644
--- a/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
+++ b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
@@ -11,8 +11,8 @@ contains
subroutine test
integer :: x
x = int (abs (cmplx(2.3,0.1)))
- x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
- x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
- x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
end subroutine test
end module fft_mod
diff --git a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
index 66db2232e77..8f928c58584 100644
--- a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
+++ b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
@@ -1,4 +1,4 @@
--- { dg-do run { xfail arm*-*-* } }
+-- { dg-do run }
-- { dg-options "-O2" }
-- This is an optimization test and its failure is only a missed optimization.
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index f9d52bcf63d..89eec95a5f7 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -144,6 +144,11 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
+ "dso" {
+ set compile_type "executable"
+ set output_file "[file rootname [file tail $prog]].so"
+ set extra_tool_flags "$extra_tool_flags -fPIC -shared"
+ }
"repo" {
set compile_type "object"
set output_file "[file rootname [file tail $prog]].o"
@@ -181,6 +186,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
lappend options "additional_flags=$extra_tool_flags"
}
+ verbose "$target_compile $prog $output_file $compile_type $options" 4
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
# Look for an internal compiler error, which sometimes masks the fact
@@ -208,6 +214,26 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
return [gcc-dg-test-1 gcc_target_compile $prog $do_what $extra_tool_flags]
}
+# Usage: { dg-build-dso "file.ext" }
+# Compiles the specified file into "file.so" (treating that compilation as
+# a separate test) for use by the main test, and schedules it for removal
+# when the main test is complete. The DSO source file should not use "dg-do".
+# This relies on a couple of local variable names in dg-test.
+
+proc dg-build-dso { args } {
+ global dg-do-what-default
+ upvar prog main_file
+ upvar dg-final-code final-code
+
+ set file [lindex $args 1]
+ set dir "[file dirname $main_file]"
+ set dg-do-what-default dso
+ dg-test -keep-output $dir/$file "" ""
+
+ set output_file "[file rootname [file tail $file]].so"
+ append final-code "remove-build-file $output_file"
+}
+
proc gcc-dg-prune { system text } {
global additional_prunes
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 0d2ccd512bc..1a5c2fa1b97 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -746,7 +746,14 @@ proc check_effective_target_mmap {} {
# Return 1 if the target supports dlopen, 0 otherwise.
proc check_effective_target_dlopen {} {
- return [check_function_available "dlopen"]
+ return [check_no_compiler_messages dlopen executable {
+ #include <dlfcn.h>
+ int main(void) { dlopen ("dummy.so", RTLD_NOW); }
+ } [add_options_for_dlopen ""]]
+}
+
+proc add_options_for_dlopen { flags } {
+ return "$flags -ldl"
}
# Return 1 if the target supports clone, 0 otherwise.
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 08401dd2db6..b7882cf6762 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -586,9 +586,6 @@ fixup_noreturn_call (gimple stmt)
update_stmt (stmt);
changed = true;
}
- /* Similarly remove VDEF if there is any. */
- else if (gimple_vdef (stmt))
- update_stmt (stmt);
return changed;
}
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 77446c5dd64..83d5ca62d6c 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -3465,6 +3465,12 @@ pp_double_int (pretty_printer *pp, double_int d, bool uns)
pp_wide_integer (pp, d.low);
else if (d.fits_uhwi ())
pp_unsigned_wide_integer (pp, d.low);
+ else if (HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT)
+ pp_scalar (pp,
+ uns
+ ? HOST_WIDEST_INT_PRINT_UNSIGNED : HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) ((((unsigned HOST_WIDEST_INT) d.high << 1)
+ << (HOST_BITS_PER_WIDE_INT - 1)) | d.low));
else
{
unsigned HOST_WIDE_INT low = d.low;
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 14ba20fce77..8bc4e8fc791 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -4363,8 +4363,10 @@ cand_value_at (struct loop *loop, struct iv_cand *cand, gimple at, tree niter,
tree steptype = type;
if (POINTER_TYPE_P (type))
steptype = sizetype;
+ steptype = unsigned_type_for (type);
- tree_to_aff_combination (iv->step, steptype, &step);
+ tree_to_aff_combination (iv->step, TREE_TYPE (iv->step), &step);
+ aff_combination_convert (&step, steptype);
tree_to_aff_combination (niter, TREE_TYPE (niter), &nit);
aff_combination_convert (&nit, steptype);
aff_combination_mult (&nit, &step, &delta);
@@ -4372,6 +4374,8 @@ cand_value_at (struct loop *loop, struct iv_cand *cand, gimple at, tree niter,
aff_combination_add (&delta, &step);
tree_to_aff_combination (iv->base, type, val);
+ if (!POINTER_TYPE_P (type))
+ aff_combination_convert (val, steptype);
aff_combination_add (val, &delta);
}
@@ -4750,7 +4754,8 @@ may_eliminate_iv (struct ivopts_data *data,
cand_value_at (loop, cand, use->stmt, desc->niter, &bnd);
- *bound = aff_combination_to_tree (&bnd);
+ *bound = fold_convert (TREE_TYPE (cand->iv->base),
+ aff_combination_to_tree (&bnd));
*comp = iv_elimination_compare (data, use);
/* It is unlikely that computing the number of iterations using division
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 352ccca4e30..c525fe579ea 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -648,10 +648,8 @@ maybe_add_call_vops (struct function *fn, gimple stmt)
call-clobbered. */
if (!(call_flags & ECF_NOVOPS))
{
- /* A 'pure' or a 'const' function never call-clobbers anything.
- A 'noreturn' function might, but since we don't return anyway
- there is no point in recording that. */
- if (!(call_flags & (ECF_PURE | ECF_CONST | ECF_NORETURN)))
+ /* A 'pure' or a 'const' function never call-clobbers anything. */
+ if (!(call_flags & (ECF_PURE | ECF_CONST)))
add_virtual_operand (fn, stmt, opf_def);
else if (!(call_flags & ECF_CONST))
add_virtual_operand (fn, stmt, opf_use);
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 2fc822081c8..2b535a1fef0 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -144,7 +144,7 @@ make_ssa_name_fn (struct function *fn, tree var, gimple stmt)
/* The node was cleared out when we put it on the free list, so
there is no need to do so again here. */
- gcc_assert (ssa_name (SSA_NAME_VERSION (t)) == NULL);
+ gcc_assert ((*SSANAMES (fn))[SSA_NAME_VERSION (t)] == NULL);
(*SSANAMES (fn))[SSA_NAME_VERSION (t)] = t;
}
else
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 646fba52688..90dec0a1ce6 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -523,13 +523,6 @@ streamer_write_chain (struct output_block *ob, tree t, bool ref_p)
{
while (t)
{
- tree saved_chain;
-
- /* Clear TREE_CHAIN to avoid blindly recursing into the rest
- of the list. */
- saved_chain = TREE_CHAIN (t);
- TREE_CHAIN (t) = NULL_TREE;
-
/* We avoid outputting external vars or functions by reference
to the global decls section as we do not want to have them
enter decl merging. This is, of course, only for the call
@@ -541,7 +534,6 @@ streamer_write_chain (struct output_block *ob, tree t, bool ref_p)
else
stream_write_tree (ob, t, ref_p);
- TREE_CHAIN (t) = saved_chain;
t = TREE_CHAIN (t);
}
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c
index af9461e7710..517bf77f66b 100644
--- a/gcc/tree-streamer.c
+++ b/gcc/tree-streamer.c
@@ -101,20 +101,19 @@ static void
streamer_tree_cache_add_to_node_array (struct streamer_tree_cache_d *cache,
unsigned ix, tree t, hashval_t hash)
{
- /* Make sure we're either replacing an old element or
- appending consecutively. */
- gcc_assert (ix <= cache->nodes.length ());
-
- if (ix == cache->nodes.length ())
+ /* We're either replacing an old element or appending consecutively. */
+ if (cache->nodes.exists ())
{
- cache->nodes.safe_push (t);
- if (cache->hashes.exists ())
- cache->hashes.safe_push (hash);
+ if (cache->nodes.length () == ix)
+ cache->nodes.safe_push (t);
+ else
+ cache->nodes[ix] = t;
}
- else
+ if (cache->hashes.exists ())
{
- cache->nodes[ix] = t;
- if (cache->hashes.exists ())
+ if (cache->hashes.length () == ix)
+ cache->hashes.safe_push (hash);
+ else
cache->hashes[ix] = hash;
}
}
@@ -146,7 +145,7 @@ streamer_tree_cache_insert_1 (struct streamer_tree_cache_d *cache,
{
/* Determine the next slot to use in the cache. */
if (insert_at_next_slot_p)
- ix = cache->nodes.length ();
+ ix = cache->next_idx++;
else
ix = *ix_p;
*slot = ix;
@@ -211,7 +210,7 @@ void
streamer_tree_cache_append (struct streamer_tree_cache_d *cache,
tree t, hashval_t hash)
{
- unsigned ix = cache->nodes.length ();
+ unsigned ix = cache->next_idx++;
if (!cache->node_map)
streamer_tree_cache_add_to_node_array (cache, ix, t, hash);
else
@@ -326,7 +325,7 @@ preload_common_nodes (struct streamer_tree_cache_d *cache)
/* Create a cache of pickled nodes. */
struct streamer_tree_cache_d *
-streamer_tree_cache_create (bool with_hashes, bool with_map)
+streamer_tree_cache_create (bool with_hashes, bool with_map, bool with_vec)
{
struct streamer_tree_cache_d *cache;
@@ -334,7 +333,9 @@ streamer_tree_cache_create (bool with_hashes, bool with_map)
if (with_map)
cache->node_map = new pointer_map<unsigned>;
- cache->nodes.create (165);
+ cache->next_idx = 0;
+ if (with_vec)
+ cache->nodes.create (165);
if (with_hashes)
cache->hashes.create (165);
diff --git a/gcc/tree-streamer.h b/gcc/tree-streamer.h
index 2aca29a12b9..20dbba024f0 100644
--- a/gcc/tree-streamer.h
+++ b/gcc/tree-streamer.h
@@ -52,6 +52,9 @@ struct streamer_tree_cache_d
vec<tree> nodes;
/* The node hashes (if available). */
vec<hashval_t> hashes;
+
+ /* Next index to assign. */
+ unsigned next_idx;
};
/* Return true if tree node EXPR should be streamed as a builtin. For
@@ -97,7 +100,7 @@ void streamer_tree_cache_append (struct streamer_tree_cache_d *, tree,
hashval_t);
bool streamer_tree_cache_lookup (struct streamer_tree_cache_d *, tree,
unsigned *);
-struct streamer_tree_cache_d *streamer_tree_cache_create (bool, bool);
+struct streamer_tree_cache_d *streamer_tree_cache_create (bool, bool, bool);
void streamer_tree_cache_delete (struct streamer_tree_cache_d *);
/* Return the tree node at slot IX in CACHE. */
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index df6ab6fcb9e..1c78e114fe1 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -933,6 +933,7 @@ new_loop_vec_info (struct loop *loop)
LOOP_VINFO_NITERS (res) = NULL;
LOOP_VINFO_NITERS_UNCHANGED (res) = NULL;
LOOP_VINFO_COST_MODEL_MIN_ITERS (res) = 0;
+ LOOP_VINFO_COST_MODEL_THRESHOLD (res) = 0;
LOOP_VINFO_VECTORIZABLE_P (res) = 0;
LOOP_VINFO_PEELING_FOR_ALIGNMENT (res) = 0;
LOOP_VINFO_VECT_FACTOR (res) = 0;
@@ -1579,6 +1580,8 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp)
|| min_profitable_iters > min_scalar_loop_bound))
th = (unsigned) min_profitable_iters;
+ LOOP_VINFO_COST_MODEL_THRESHOLD (loop_vinfo) = th;
+
if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
&& LOOP_VINFO_INT_NITERS (loop_vinfo) <= th)
{
@@ -1625,6 +1628,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
bool ok, slp = false;
int max_vf = MAX_VECTORIZATION_FACTOR;
int min_vf = 2;
+ unsigned int th;
/* Find all data references in the loop (which correspond to vdefs/vuses)
and analyze their evolution in the loop. Also adjust the minimal
@@ -1769,6 +1773,10 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
/* Decide whether we need to create an epilogue loop to handle
remaining scalar iterations. */
+ th = ((LOOP_VINFO_COST_MODEL_THRESHOLD (loop_vinfo) + 1)
+ / LOOP_VINFO_VECT_FACTOR (loop_vinfo))
+ * LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+
if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
&& LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) > 0)
{
@@ -1779,7 +1787,14 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
}
else if (LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo)
|| (tree_ctz (LOOP_VINFO_NITERS (loop_vinfo))
- < (unsigned)exact_log2 (LOOP_VINFO_VECT_FACTOR (loop_vinfo))))
+ < (unsigned)exact_log2 (LOOP_VINFO_VECT_FACTOR (loop_vinfo))
+ /* In case of versioning, check if the maximum number of
+ iterations is greater than th. If they are identical,
+ the epilogue is unnecessary. */
+ && ((!LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo)
+ && !LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo))
+ || (unsigned HOST_WIDE_INT)max_stmt_executions_int
+ (LOOP_VINFO_LOOP (loop_vinfo)) > th)))
LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo) = true;
/* If an epilogue loop is required make sure we can create one. */
@@ -5775,9 +5790,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
by our caller. If the threshold makes all loops profitable that
run at least the vectorization factor number of times checking
is pointless, too. */
- th = ((PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)
- * LOOP_VINFO_VECT_FACTOR (loop_vinfo)) - 1);
- th = MAX (th, LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo));
+ th = LOOP_VINFO_COST_MODEL_THRESHOLD (loop_vinfo);
if (th >= LOOP_VINFO_VECT_FACTOR (loop_vinfo) - 1
&& !LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
{
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 884e769c884..1a51d6d7b57 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -7848,7 +7848,21 @@ supportable_widening_operation (enum tree_code code, gimple stmt,
stmt, vectype_out, vectype_in,
code1, code2, multi_step_cvt,
interm_types))
- return true;
+ {
+ /* Elements in a vector with vect_used_by_reduction property cannot
+ be reordered if the use chain with this property does not have the
+ same operation. One such an example is s += a * b, where elements
+ in a and b cannot be reordered. Here we check if the vector defined
+ by STMT is only directly used in the reduction statement. */
+ tree lhs = gimple_assign_lhs (stmt);
+ use_operand_p dummy;
+ gimple use_stmt;
+ stmt_vec_info use_stmt_info = NULL;
+ if (single_imm_use (lhs, &dummy, &use_stmt)
+ && (use_stmt_info = vinfo_for_stmt (use_stmt))
+ && STMT_VINFO_DEF_TYPE (use_stmt_info) == vect_reduction_def)
+ return true;
+ }
c1 = VEC_WIDEN_MULT_LO_EXPR;
c2 = VEC_WIDEN_MULT_HI_EXPR;
break;
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index f8efe471e06..f2087e22383 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -264,6 +264,11 @@ typedef struct _loop_vec_info {
values unknown at compile time. */
int min_profitable_iters;
+ /* Threshold of number of iterations below which vectorzation will not be
+ performed. It is calculated from MIN_PROFITABLE_ITERS and
+ PARAM_MIN_VECT_LOOP_BOUND. */
+ unsigned int th;
+
/* Is the loop vectorizable? */
bool vectorizable;
@@ -382,6 +387,7 @@ typedef struct _loop_vec_info {
cost model. */
#define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged
#define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters
+#define LOOP_VINFO_COST_MODEL_THRESHOLD(L) (L)->th
#define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable
#define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor
#define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c65abca0943..dfab69de0d7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2014-04-07 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/20_util/exchange/1.cc: Add missing return statements.
+ * testsuite/20_util/pair/40925.cc: Avoid most vexing parse.
+ * testsuite/22_locale/codecvt_byname/50714.cc: Add missing exception
+ specifications.
+
2014-04-02 Dominique d'Humieres <dominiq@lps.ens.fr>
Jack Howarth <howarth@bromo.med.uc.edu>
diff --git a/libstdc++-v3/testsuite/20_util/exchange/1.cc b/libstdc++-v3/testsuite/20_util/exchange/1.cc
index 923920edda7..2f8825d1eca 100644
--- a/libstdc++-v3/testsuite/20_util/exchange/1.cc
+++ b/libstdc++-v3/testsuite/20_util/exchange/1.cc
@@ -78,8 +78,8 @@ void test04()
To() = default;
To(const To&) = default;
To(const From&) = delete;
- To& operator=(const From&) { value = 1; }
- To& operator=(From&&) { value = 2; }
+ To& operator=(const From&) { value = 1; return *this; }
+ To& operator=(From&&) { value = 2; return *this; }
};
To t;
diff --git a/libstdc++-v3/testsuite/20_util/pair/40925.cc b/libstdc++-v3/testsuite/20_util/pair/40925.cc
index 599fd3875e5..5b34a626eb1 100644
--- a/libstdc++-v3/testsuite/20_util/pair/40925.cc
+++ b/libstdc++-v3/testsuite/20_util/pair/40925.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2009-2014 Free Software Foundation, Inc.
@@ -63,5 +63,5 @@ void test01()
std::pair<move_only, int*> p15(move_only(), ip);
std::pair<move_only, int X::*> p16(move_only(), mp);
- std::pair<move_only, move_only> p17(move_only(), move_only());
+ std::pair<move_only, move_only> p17{move_only(), move_only()};
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
index e40717ba168..d42caa54e05 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
@@ -52,12 +52,12 @@ namespace std
template<>
int
- codecvt<mychar, char, mbstate_t>::do_encoding() const
+ codecvt<mychar, char, mbstate_t>::do_encoding() const throw()
{ return 0; }
template<>
bool
- codecvt<mychar, char, mbstate_t>::do_always_noconv() const
+ codecvt<mychar, char, mbstate_t>::do_always_noconv() const throw()
{ return false; }
template<>
@@ -69,7 +69,7 @@ namespace std
template<>
int
- codecvt<mychar, char, mbstate_t>::do_max_length() const
+ codecvt<mychar, char, mbstate_t>::do_max_length() const throw()
{ return 4; }
}