aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2013-03-07 19:32:28 +0000
committerDiego Novillo <dnovillo@google.com>2013-03-07 19:32:28 +0000
commit42cdedf98f701662c4437349eb0bdb990f181450 (patch)
tree16e3932f1ea570a0d413d8471d4e9522586fedc8
parent028b9a420139b04d9076969c6bce30408eb57a33 (diff)
Merged revisions 196245-196246,196249,196252-196255,196259-196260,196263-196264,196268,196270,196273-196278,196280-196282,196284-196291,196293-196294,196296,196300,196304-196306,196308-196309,196313,196315-196316,196319-196325,196328-196336,196338,196340-196341,196343,196345,196347,196349,196352,196355-196356,196358-196362,196365,196369-196372,196377,196380,196386-196389,196393-196394,196396-196398,196400,196403,196405-196407,196410 via svnmerge from
svn+ssh://gcc.gnu.org/svn/gcc/trunk git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/integration@196526 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--config/ChangeLog5
-rw-r--r--config/bootstrap-asan.mk1
-rw-r--r--contrib/ChangeLog4
-rw-r--r--contrib/make_sunver.pl4
-rw-r--r--gcc/ChangeLog614
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h8
-rw-r--r--gcc/asan.c2
-rw-r--r--gcc/c-family/ChangeLog10
-rw-r--r--gcc/c-family/c-common.c28
-rw-r--r--gcc/cfgrtl.c10
-rw-r--r--gcc/config/aarch64/aarch64-builtins.c2
-rw-r--r--gcc/config/aarch64/aarch64.c9
-rw-r--r--gcc/config/arm/arm.c4
-rw-r--r--gcc/config/avr/avr-mcus.def77
-rw-r--r--gcc/config/avr/avr-tables.opt562
-rw-r--r--gcc/config/avr/avr.c26
-rw-r--r--gcc/config/avr/avr.h17
-rw-r--r--gcc/config/avr/builtins.def36
-rw-r--r--gcc/config/avr/driver-avr.c21
-rw-r--r--gcc/config/avr/t-multilib72
-rw-r--r--gcc/config/c6x/c6x.c2
-rw-r--r--gcc/config/c6x/c6x.h2
-rw-r--r--gcc/config/cr16/cr16-protos.h4
-rw-r--r--gcc/config/lm32/lm32.c3
-rw-r--r--gcc/config/lm32/lm32.md1
-rw-r--r--gcc/config/mep/t-mep2
-rw-r--r--gcc/config/microblaze/microblaze.c17
-rw-r--r--gcc/config/microblaze/microblaze.md10
-rw-r--r--gcc/config/mips/micromips.md0
-rw-r--r--gcc/config/mn10300/mn10300.c3
-rw-r--r--gcc/config/tilegx/tilegx.c2
-rw-r--r--gcc/config/tilepro/tilepro.c2
-rw-r--r--gcc/cp/ChangeLog50
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/class.c5
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/init.c2
-rw-r--r--gcc/cp/name-lookup.c21
-rw-r--r--gcc/cp/pt.c56
-rw-r--r--gcc/cp/semantics.c27
-rw-r--r--gcc/df-scan.c2
-rw-r--r--gcc/doc/avr-mmcu.texi18
-rw-r--r--gcc/doc/extend.texi113
-rw-r--r--gcc/doc/gcc.texi2
-rw-r--r--gcc/doc/gty.texi4
-rw-r--r--gcc/doc/invoke.texi268
-rw-r--r--gcc/doc/md.texi2
-rw-r--r--gcc/fold-const.c35
-rw-r--r--gcc/fortran/ChangeLog11
-rw-r--r--gcc/fortran/iresolve.c2
-rw-r--r--gcc/fortran/symbol.c1
-rw-r--r--gcc/fortran/trans-decl.c10
-rw-r--r--gcc/fortran/trans-io.c2
-rw-r--r--gcc/incpath.c31
-rw-r--r--gcc/insn-notes.def4
-rw-r--r--gcc/ipa-cp.c3
-rw-r--r--gcc/ipa-pure-const.c2
-rw-r--r--gcc/ipa-reference.c8
-rw-r--r--gcc/ira-build.c15
-rw-r--r--gcc/loop-unroll.c31
-rw-r--r--gcc/lra-spills.c1
-rw-r--r--gcc/lto-wrapper.c2
-rw-r--r--gcc/opts-common.c15
-rw-r--r--gcc/opts.c45
-rw-r--r--gcc/opts.h7
-rw-r--r--gcc/sched-deps.c6
-rw-r--r--gcc/sel-sched-ir.c8
-rw-r--r--gcc/stmt.c4
-rw-r--r--gcc/target-globals.c3
-rw-r--r--gcc/testsuite/ChangeLog141
-rw-r--r--gcc/testsuite/c-c++-common/asan/attrib-1.c38
-rw-r--r--gcc/testsuite/g++.dg/asan/default-options-1.C2
-rw-r--r--gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-and.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C22
-rw-r--r--gcc/testsuite/g++.dg/debug/pr56294.C30
-rw-r--r--gcc/testsuite/g++.dg/inherit/using5.C2
-rw-r--r--gcc/testsuite/g++.dg/template/cast3.C22
-rw-r--r--gcc/testsuite/g++.dg/template/static33.C18
-rw-r--r--gcc/testsuite/g++.dg/template/static34.C21
-rw-r--r--gcc/testsuite/g++.dg/template/static35.C21
-rw-r--r--gcc/testsuite/g++.dg/template/virtual4.C30
-rw-r--r--gcc/testsuite/g++.dg/tm/pr56419.C13
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56403.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/using3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56448.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr45472.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr56396.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr56436.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr56466.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56443.c29
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56488.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-constraints-1.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-constraints-2.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-1.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-2.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-3.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-4.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-5.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-6.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-7.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-8.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-movep-1.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-movep-2.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-1.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-2.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-3.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-1.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-2.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-3.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-4.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-5.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-6.c0
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-7.c0
-rw-r--r--gcc/tree-cfgcleanup.c2
-rw-r--r--gcc/tree-flow.h2
-rw-r--r--gcc/tree-sra.c48
-rw-r--r--gcc/tree-ssa-forwprop.c37
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c3
-rw-r--r--gcc/tree-ssa-loop-niter.c1
-rw-r--r--gcc/tree-ssa-loop.c5
-rw-r--r--gcc/tree-ssa-uninit.c5
-rw-r--r--gcc/tree-ssa.c19
-rw-r--r--gcc/tree-vect-data-refs.c14
-rw-r--r--gcc/tree-vect-loop.c1
-rw-r--r--gcc/tree-vect-slp.c13
-rw-r--r--gcc/tree-vect-stmts.c40
-rw-r--r--gcc/tree-vectorizer.h2
-rw-r--r--include/ChangeLog4
-rw-r--r--include/dwarf2.h14
-rw-r--r--libcpp/ChangeLog27
-rw-r--r--libcpp/config.in4
-rwxr-xr-xlibcpp/configure46
-rw-r--r--libcpp/configure.ac46
-rw-r--r--libcpp/files.c48
-rw-r--r--libcpp/lex.c13
-rw-r--r--libcpp/pch.c14
-rw-r--r--libgcc/ChangeLog24
-rw-r--r--libgcc/config/aarch64/sync-cache.c6
-rw-r--r--libgo/go/testing/quick/quick_test.go7
-rw-r--r--libgo/runtime/go-reflect-call.c12
-rw-r--r--libgo/runtime/proc.c6
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/libiberty.texi6
-rw-r--r--libiberty/obstacks.texi2
-rw-r--r--libsanitizer/ChangeLog6
-rw-r--r--libsanitizer/asan/asan_mapping.h12
-rw-r--r--libsanitizer/asan/asan_rtl.cc2
-rw-r--r--libstdc++-v3/ChangeLog64
-rw-r--r--libstdc++-v3/acinclude.m47
-rw-r--r--libstdc++-v3/config.h.in3
-rw-r--r--libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt12
-rw-r--r--libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt12
-rw-r--r--libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt12
-rw-r--r--libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt11
-rw-r--r--libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt11
-rwxr-xr-xlibstdc++-v3/configure27
-rw-r--r--libstdc++-v3/configure.ac2
-rw-r--r--libstdc++-v3/include/Makefile.am1
-rw-r--r--libstdc++-v3/include/Makefile.in43
-rw-r--r--libstdc++-v3/include/bits/atomic_base.h20
-rw-r--r--libstdc++-v3/include/ext/cmath152
-rw-r--r--libstdc++-v3/include/ext/random543
-rw-r--r--libstdc++-v3/include/ext/random.tcc120
-rw-r--r--libstdc++-v3/include/std/atomic4
-rw-r--r--libstdc++-v3/libsupc++/atexit_thread.cc16
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc29
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc26
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc42
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc42
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc34
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc43
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc43
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc42
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc42
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc34
191 files changed, 4352 insertions, 790 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index c6e8b256e7a..68b911932a2 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.
+
2013-01-15 Richard Biener <rguenther@suse.de>
PR other/55973
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
index d37a9da6bbf..e3f34f5ad49 100644
--- a/config/bootstrap-asan.mk
+++ b/config/bootstrap-asan.mk
@@ -3,4 +3,5 @@
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address
POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 82abb602c8d..98834acb49f 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * make_sunver.pl: Enforce C locale.
+
2013-02-06 Richard Sandiford <rdsandiford@googlemail.com>
* update-copyright.py: Add libdecnumber to the default list.
diff --git a/contrib/make_sunver.pl b/contrib/make_sunver.pl
index db0fe21ef43..8a90b1fea0d 100644
--- a/contrib/make_sunver.pl
+++ b/contrib/make_sunver.pl
@@ -19,6 +19,10 @@
use FileHandle;
use IPC::Open2;
+# Enforce C locale.
+$ENV{'LC_ALL'} = "C";
+$ENV{'LANG'} = "C";
+
# Input version script, GNU style.
my $symvers = shift;
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fda14f3cb7e..32f6e4b6f0f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,607 @@
+2013-03-01 Xinliang David Li <davidxl@google.com>
+
+ * tree-ssa-uninit.c (compute_control_dep_chain): Limit post-dom
+ walk length.
+
+2013-03-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Release path
+ vector even when returning true. Fix up function comment formatting.
+
+ PR middle-end/56461
+ * ira-build.c (ira_loop_nodes_count): New variable.
+ (create_loop_tree_nodes): Initialize it.
+ (finish_loop_tree_nodes): Use it instead of looking at current_loops.
+
+ PR middle-end/56461
+ * tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy
+ method on dr_chain and result_chain.
+ * tree-vect-stmts.c (vectorizable_store): Only call
+ result_chain.create if j == 0.
+
+ PR middle-end/56461
+ * tree-vect-stmts.c (vect_create_vectorized_promotion_stmts): Call
+ vec_oprnds0->release (); rather than vec_oprnds0->truncate (0)
+ before overwriting it.
+
+2013-03-01 Tobias Burnus <burnus@net-b.de>
+
+ * doc/extended.texi (C Extensions): Change order in @menu
+ to match @node.
+ (Other MIPS Built-in Functions): Move last MIPS entry before
+ "picoChip Built-in Functions".
+ (SH Built-in Functions): Move after RX Built-in Functions.
+ * doc/gcc.texi (Introduction): Change order in @menu
+ to match @node.
+ * doc/md.texi (Constraints): Ditto.
+ * gty.texi (Type Information): Ditto.
+ (User-provided marking routines for template types): Make
+ subsection.
+ * doc/invoke.texi (AArch64 Options): Move before
+ "Adapteva Epiphany Options".
+
+2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/56454
+ * asan.c (gate_asan): Lookup no_sanitize_address instead of
+ no_address_safety_analysis attribute.
+ * doc/extend.texi (no_address_safety_attribute): Rename to
+ no_sanitize_address attribute, mention no_address_safety_analysis
+ attribute as deprecated alias.
+
+2013-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * tree-vectorizer.h (vect_get_slp_defs): Change 3rd argument
+ type to vec<vec<tree> > *.
+ * tree-vect-slp.c (vect_get_slp_defs): Likewise. Change vec_defs
+ to be vec<tree> instead of vec<tree> *, set vec_defs
+ to vNULL and call vec_defs.create (number_of_vects), adjust other
+ uses of vec_defs.
+ * tree-vect-stmts.c (vect_get_vec_defs, vectorizable_call,
+ vectorizable_condition): Adjust vect_get_slp_defs callers.
+
+2013-02-28 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64.c
+ (aarch64_float_const_representable): Remove unused variable.
+
+2013-02-28 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_mangle_type): Make static.
+
+2013-02-28 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64-builtins.c
+ (aarch64_init_simd_builtins): Make static.
+
+2013-02-28 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64.c
+ (aarch64_simd_make_constant): Make static.
+
+2013-02-28 Martin Jambor <mjambor@suse.cz>
+
+ * tree-sra.c (load_assign_lhs_subreplacements): Do not put replacements
+ with no initialization to the RHS of debug statements.
+
+2013-02-28 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/56294
+ * tree-sra.c (analyze_access_subtree): Create replacement declarations.
+ Adjust dumping.
+ (get_access_replacement): Do not call create_access_replacement.
+ Assert a replacement exists.
+ (get_repl_default_def_ssa_name): Create the replacement declaration
+ itself.
+
+2013-02-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * config/arm/arm.c (arm_output_mi_thunk): Call final_start_function and
+ final_end_function.
+
+2013-02-28 Marek Polacek <polacek@redhat.com>
+
+ PR rtl-optimization/56466
+ * loop-unroll.c (unroll_and_peel_loops): Call fix_loop_structure
+ if we're changing a loop.
+ (peel_loops_completely): Likewise.
+
+2013-02-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55813
+ * doc/invoke.texi ([-Wctor-dtor-privacy]): Complete.
+
+2013-02-28 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/56445
+ * config/avr/avr.c (avr_init_builtins): Use 'n' instead of empty
+ macro parameters with: FX_FTYPE_FX, FX_FTYPE_FX_INT, INT_FTYPE_FX,
+ INTX_FTYPE_FX, FX_FTYPE_INTX.
+ * config/avr/builtins.def: Adjust respective DEF_BUILTIN.
+
+2013-02-28 Georg-Johann Lay <avr@gjlay.de>
+
+ * avr/avr-mcus.def (ata5272, ata5505, attiny1634, ata6285)
+ (ata6286, atmega8a, atmega48pa, ata5790, ata5790n, ata5795)
+ (atmega164pa, atmega165pa, atmega168pa, atmega16hva, atmega16hvb)
+ (atmega16hvbrevb, atmega16m1, atmega16u4, atmega26hvg, atmega32a)
+ (atmega32a, atmega3250pa, atmega3290pa, atmega32c1, atmega32m1)
+ (atmega32u4, atmega32u6, atmega64a, atmega6490a, atmega6490p)
+ (atmega64c1, atmega64m1, atmega64rfa2, atmega64rfr2, atmega32hvb)
+ (atmega32hvbrevb, atmega16hva2, atmega48hvf, at90pwm161)
+ (atmega128a, atmega1284, atmxt112sl, atmxt224, atmxt224e)
+ (atmxt336s, atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4)
+ (atxmega32e5, atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3)
+ (atxmega64c3, atxmega64d4, atxmega128a3u, atxmega128b1)
+ (atxmega128b3, atxmega128c3, atxmega128d4, atmxt540s, atmxt540sreva)
+ (atxmega192a3u, atxmega192c3, atxmega256a3u, atxmega256c3)
+ (atxmega384c3, atxmega384d3, atxmega128a4u): New AVR_MCU.
+ (avrxmega6): Increase max flash segments from 5 to 6.
+ * config/avr/t-multilib: Regenerate.
+ * config/avr/avr-tables.opt: Regenerate.
+ * doc/avr-mmcu.texi: Regenerate.
+
+2013-02-28 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.h (device_to_arch): Rename to device_to_ld.
+ (avr_device_to_arch): Rename to avr_device_to_ld.
+ (avr_device_to_as): New prototype.
+ (EXTRA_SPEC_FUNCTIONS): Add device_to_as.
+ (ASM_SPEC): Use device_to_as to get -mmcu= and -mno-skip-bug=.
+ * config/avr/driver-avr.c (avr_device_to_as): New.
+ (avr_device_to_arch): Rename to avr_device_to_ld.
+
+2013-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * tree-vect-data-refs.c (vect_permute_load_chain): Avoid using copy
+ method on dr_chain and result_chain.
+
+ PR middle-end/56461
+ * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Call
+ pointer_set_destroy on not_executed_last_iteration.
+
+ PR middle-end/56461
+ * tree-vect-loop.c (vectorizable_reduction): Release vect_defs
+ vector.
+
+ PR middle-end/56461
+ * ipa-pure-const.c (propagate): Use FOR_EACH_FUNCTION instead of
+ FOR_EACH_DEFINED_FUNCTION when freeing state.
+
+ PR middle-end/56461
+ * df-scan.c (df_insn_delete): Use df_scan_free_mws_vec before
+ pool_free.
+ (df_insn_rescan_debug_internal): Use df_scan_free_mws_vec before
+ overwriting it.
+
+ PR middle-end/56461
+ * ipa-cp.c (decide_whether_version_node): Call vec_free on
+ known_aggs[i].items and release known_aggs vector.
+
+ PR middle-end/56461
+ * ipa-reference.c (propagate): Free node_info even for alias nodes.
+
+2013-02-27 Edgar E. Iglesias <edgar.iglesias@gmail.com>
+
+ * config/microblaze/microblaze.c (microblaze_emit_compare):
+ Use xor for EQ/NE comparisions.
+ * config/microblaze/microblaze.md (cstoresf4): Add constraints
+ (cbranchsf4): Adjust operator to comparison_operator.
+
+2013-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * tree-flow.h (edge_var_map_vector): Change into va_heap, vl_embed
+ vector.
+ * tree-ssa.c (redirect_edge_var_map_add): Use vec_safe_reserve and
+ vec_safe_push, always update *slot.
+ (redirect_edge_var_map_clear): Use vec_free.
+ (redirect_edge_var_map_dup): Use vec_safe_copy and vec_safe_reserve.
+ (free_var_map_entry): Use vec_free.
+ * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Use
+ FOR_EACH_VEC_SAFE_ELT instead of FOR_EACH_VEC_ELT.
+
+2013-02-27 Andrey Belevantsev <abel@ispras.ru>
+
+ PR middle-end/45472
+ * sel-sched-ir.c (merge_expr): Also change vinsn of merged expr
+ when the may_trap_p bit of the exprs being merged differs.
+ Reorder tests for speculativeness in the logical and operator.
+
+2013-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ * incpath.c (add_standard_paths): Use reconcat instead of concat
+ where appropriate and avoid leaking memory.
+
+ * opts.h: Include obstack.h.
+ (opts_concat): New prototype.
+ (opts_obstack): New declaration.
+ * opts.c (opts_concat): New function.
+ (opts_obstack): New variable.
+ (init_options_struct): Call gcc_init_obstack on opts_obstack.
+ (finish_options): Use opts_concat instead of concat
+ and XOBNEWVEC instead of XNEWVEC.
+ * opts-common.c (generate_canonical_option, decode_cmdline_option,
+ generate_option): Likewise.
+ * Makefile.in (OPTS_H): Depend on $(OBSTACK_H).
+ * lto-wrapper.c (main): Call gcc_init_obstack on opts_obstack.
+
+ PR target/56455
+ * stmt.c (expand_switch_as_decision_tree_p): If flag_pic
+ and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.
+
+2013-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * lra-spills.c (lra_spill): Free spill_hard_reg at the end.
+
+2013-02-26 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * config/arm/arm.c (const_ok_for_dimode_op): Back out last change.
+ (arm_block_move_unaligned_straight): Likewise.
+ (arm_adjust_block_mem): Likewise.
+
+2013-02-26 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR target/48901
+ * config/lm32/lm32.c (gen_int_relational): Remove unused variables
+ temp, cond and label.
+ * config/lm32/lm32.md (ashlsi3): Remove unused variable one.
+
+ PR target/52500
+ * config/c6x/c6x.c (dbx_register_map): Change to unsigned.
+ * config/c6x/c6x.h (dbx_register_map): Update declaration.
+
+ PR target/52501
+ * config/cr16/cr16-protos.h: Move end of RTX_CODE guard below end
+ of prologue/epilogue functions.
+
+ PR target/52550
+ * config/tilegx/tilegx.c (tilegx_expand_prologue):
+ Remove unused variable cfa_offset.
+ * config/tilepro/tilepro.c (tilepro_expand_prologue): Likewise.
+
+ PR target/54639
+ * config/mn10300/mn10300.c (mn10300_expand_epilogue): Avoid offset
+ type promotion to unsigned.
+
+ PR target/54640
+ * config/arm/arm.c (const_ok_for_dimode_op): Make code consistent
+ for HOST_WIDE_INT of 32 bit / same size as int.
+ (arm_block_move_unaligned_straight): Likewise.
+ (arm_adjust_block_mem): Likewise.
+
+ PR target/54662
+ * config/mep/t-mep (mep-pragma.o): Use ALL_COMPILERFLAGS instead of
+ ALL_CFLAGS.
+
+2013-02-26 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56426
+ * tree-ssa-loop.c (tree_ssa_loop_init): Always call
+ scev_initialize.
+
+2013-02-26 Richard Biener <rguenther@suse.de>
+
+ PR target/56444
+ * config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Remove
+ unused variable loops.
+
+2013-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56448
+ * fold-const.c (operand_equal_p) <case tcc_reference>: Don't look at
+ TREE_SIDE_EFFECTS if flags contain OEP_CONSTANT_ADDRESS_OF.
+ Clear OEP_CONSTANT_ADDRESS_OF from flags before recursing on second or
+ later operands of the references, or even first operand for
+ INDIRECT_REF, TARGET_MEM_REF or MEM_REF.
+
+ PR tree-optimization/56443
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): For
+ overaligned types, pass TYPE_UNSIGNED (scalar_type) as second argument
+ to type_for_mode langhook.
+
+2013-02-25 Matt Turner <mattst88@gmail.com>
+
+ * doc/invoke.texi: Document r4700.
+
+2013-02-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56175
+ * tree-ssa-forwprop.c (hoist_conversion_for_bitop_p): New predicate,
+ split out from ...
+ (simplify_bitwise_binary): ... here. Also guard the conversion
+ of (type) X op CST to (type) (X op ((type-x) CST)) with it.
+
+2013-02-25 Catherine Moore <clm@codesourcery.com>
+
+ Revert:
+ 2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Maciej W. Rozycki <macro@codesourcery.com>
+ Tom de Vries <tom@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Iain Sandoe <iain@codesourcery.com>
+ Nathan Froyd <froydnj@codesourcery.com>
+ Chao-ying Fu <fu@mips.com>
+ * doc/extend.texi: (micromips, nomicromips, nocompression):
+ Document new function attributes.
+ * doc/invoke.texi (minterlink-compressed, mmicromips,
+ m14k, m14ke, m14kec): Document new options.
+ (minterlink-mips16): Update documentation.
+ * doc/md.texi (ZC, ZD): Document new constraints.
+ * configure.ac (gcc_cv_as_micromips): Check if linker
+ supports the .set micromips directive.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * config/mips/mips-tables.opt: Regenerate.
+ * config/mips/micromips.md: New file.
+ * constraints.md (ZC, AD): New constraints.
+ * config/mips/predicates.md (movep_src_register): New predicate.
+ (movep_src_operand): New predicate.
+ (non_volatile_mem_operand): New predicate.
+ * config/mips/mips.md (multimem): New type.
+ (length): Differentiate between 17-bit and 18-bit branch offsets.
+ (MOVEP1, MOVEP2): New mode iterator.
+ (mov_<load>l): Use ZC constraint.
+ (mov_<load>r): Likewise.
+ (mov_<store>l): Likewise.
+ (mov_<store>r): Likewise.
+ (*branch_equality<mode>_inverted): Add microMIPS support.
+ (*branch_equality<mode>): Likewise.
+ (*jump_absolute): Likewise.
+ (indirect_jump_<mode>): Likewise.
+ (tablejump_<mode>): Likewise.
+ (<optab>_internal): Likewise.
+ (sibcall_internal): Likewise.
+ (sibcall_value_internal): Likewise.
+ (prefetch): Use constraint ZD.
+ * config/mips/mips.opt (minterlink-compressed): New option.
+ (minterlink-mips16): Now an alias for minterlink-compressed.
+ (mmicromips): New option.
+ * config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
+ (compare_and_swap_12): Likewise.
+ (sync_add<mode>): Likewise.
+ (sync_<optab>_12): Likewise.
+ (sync_old_<optab>_12): Likewise.
+ (sync_new_<optab>_12): Likewise.
+ (sync_nand_12): Likewise.
+ (sync_old_nand_12): Likewise.
+ (sync_new_nand_12): Likewise.
+ (sync_sub<mode>): Likewise.
+ (sync_old_add<mode>): Likewise.
+ (sync_old_sub<mode>): Likewise.
+ (sync_new_add<mode>): Likewise.
+ (sync_new_sub<mode>): Likewise.
+ (sync_<optab><mode>): Likewise.
+ (sync_old_<optab><mode>): Likewise.
+ (sync_new_<optab><mode>): Likewise.
+ (sync_nand<mode>): Likewise.
+ (sync_old_nand<mode>): Likewise.
+ (sync_new_nand<mode>): Likewise.
+ (sync_lock_test_and_set<mode>): Likewise.
+ (test_and_set_12): Likewise.
+ (atomic_compare_and_swap<mode>): Likewise.
+ (atomic_exchange<mode>_llsc): Likewise.
+ (atomic_fetch_add<mode>_llsc): Likewise.
+ * config/mips/mips-cpus.def (m14kc, m14k): New processors.
+ * config/mips/mips-protos.h (umips_output_save_restore): New prototype.
+ (umips_save_restore_pattern_p): Likewise.
+ (umips_load_store_pair_p): Likewise.
+ (umips_output_load_store_pair): Likewise.
+ (umips_movep_target_p): Likewise.
+ (umips_12bit_offset_address_p): Likewise.
+ * config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
+ (mips_base_mips16): Rename this...
+ (mips_base_compression_flags): ...to this. Update all uses.
+ (mips_attribute_table): Add micromips, nomicromips and nocompression.
+ (mips_mips16_decl_p): Delete.
+ (mips_nomips16_decl_p): Delete.
+ (mips_get_compress_on_flags): New function.
+ (mips_get_compress_off_flags): New function.
+ (mips_get_compress_mode): New function.
+ (mips_get_compress_on_name): New function.
+ (mips_get_compress_off_name): New function.
+ (mips_insert_attributes): Support multiple compression types.
+ (mips_merge_decl_attributes): Likewise.
+ (umips_12bit_offset_address_p): New function.
+ (mips_start_function_definition): Emit .set micromips directive.
+ (mips_call_may_need_jalx_p): New function.
+ (mips_function_ok_for_sibcall): Add microMIPS support.
+ (mips_print_operand_punctuation): Support short delay slots and
+ compact jumps.
+ (umips_swm_mask, umips_swm_encoding): New.
+ (umips_build_save_restore): New function.
+ (mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
+ (was_mips16_p): Remove.
+ (old_compression_mode): New.
+ (mips_set_compression_mode): New function.
+ (mips_set_current_function): Add microMIPS support.
+ (mips_option_override): Likewise.
+ (umips_save_restore_pattern_p): New function.
+ (umips_output_save_restore): New function.
+ (umips_load_store_pair_p_1): New function.
+ (umips_load_store_pair_p): New function.
+ (umips_output_load_store_pair_1): New function.
+ (umips_output_load_store_pair): New function.
+ (umips_movep_target_p) New function.
+ (mips_prepare_pch_save): Add microMIPS support.
+ * config/mips/mips.h (TARGET_COMPRESSION): New.
+ (TARGET_CPU_CPP_BUILTINS): Update macro
+ to use new compression flags and to support microMIPS.
+ (MIPS_ISA_LEVEL_SPEC): Add m14k processors.
+ (MIPS_ARCH_FLOAT_SPEC): Likewise.
+ (ISA_HAS_LWXS): Include TARGET_MICROMIPS.
+ (ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
+ (ASM_SPEC): Support mmicromips and mno-micromips.
+ (M16STORE_REG_P): New macro.
+ (MIPS_CALL): Support TARGET_MICROMIPS.
+ (MICROMIPS_J): New macro.
+ (mips_base_mips16): Rename this...
+ (mips_base_compression_flags): ...to this.
+ (UMIPS_12BIT_OFFSET_P): New macro.
+ * config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
+ (MULTILIB_DIRNAMES): Likewise.
+
+2013-02-25 Tom de Vries <tom@codesourcery.com>
+
+ PR rtl-optimization/56131
+ * insn-notes.def (INSN_NOTE_BASIC_BLOCK): Update comment.
+ * cfgrtl.c (delete_insn): Don't reorder NOTE_INSN_DELETED_LABEL and
+ NOTE_INSN_BASIC_BLOCK if BLOCK_FOR_INSN == NULL.
+
+2013-02-25 Tobias Burnus <burnus@net-b.de>
+
+ * doc/invoke.texi (-fsanitize=): Move from optimization
+ to debugging options.
+
+2013-02-25 Andrey Belevantsev <abel@ispras.ru>
+
+ * sched-deps.c (sched_analyze_insn): Fix typo in comment.
+
+2013-02-25 Andrey Belevantsev <abel@ispras.ru>
+ Alexander Monakov <amonakov@ispras.ru>
+
+ PR middle-end/56077
+ * sched-deps.c (sched_analyze_insn): When reg_pending_barrier,
+ flush pending lists also on non-jumps. Adjust comment.
+
+2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Maciej W. Rozycki <macro@codesourcery.com>
+ Tom de Vries <tom@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Iain Sandoe <iain@codesourcery.com>
+ Nathan Froyd <froydnj@codesourcery.com>
+ Chao-ying Fu <fu@mips.com>
+
+ * doc/extend.texi: (micromips, nomicromips, nocompression):
+ Document new function attributes.
+ * doc/invoke.texi (minterlink-compressed, mmicromips,
+ m14k, m14ke, m14kec): Document new options.
+ (minterlink-mips16): Update documentation.
+ * doc/md.texi (ZC, ZD): Document new constraints.
+ * configure.ac (gcc_cv_as_micromips): Check if linker
+ supports the .set micromips directive.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * config/mips/mips-tables.opt: Regenerate.
+ * config/mips/micromips.md: New file.
+ * constraints.md (ZC, AD): New constraints.
+ * config/mips/predicates.md (movep_src_register): New predicate.
+ (movep_src_operand): New predicate.
+ (non_volatile_mem_operand): New predicate.
+ * config/mips/mips.md (multimem): New type.
+ (length): Differentiate between 17-bit and 18-bit branch offsets.
+ (MOVEP1, MOVEP2): New mode iterator.
+ (mov_<load>l): Use ZC constraint.
+ (mov_<load>r): Likewise.
+ (mov_<store>l): Likewise.
+ (mov_<store>r): Likewise.
+ (*branch_equality<mode>_inverted): Add microMIPS support.
+ (*branch_equality<mode>): Likewise.
+ (*jump_absolute): Likewise.
+ (indirect_jump_<mode>): Likewise.
+ (tablejump_<mode>): Likewise.
+ (<optab>_internal): Likewise.
+ (sibcall_internal): Likewise.
+ (sibcall_value_internal): Likewise.
+ (prefetch): Use constraint ZD.
+ * config/mips/mips.opt (minterlink-compressed): New option.
+ (minterlink-mips16): Now an alias for minterlink-compressed.
+ (mmicromips): New option.
+ * config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
+ (compare_and_swap_12): Likewise.
+ (sync_add<mode>): Likewise.
+ (sync_<optab>_12): Likewise.
+ (sync_old_<optab>_12): Likewise.
+ (sync_new_<optab>_12): Likewise.
+ (sync_nand_12): Likewise.
+ (sync_old_nand_12): Likewise.
+ (sync_new_nand_12): Likewise.
+ (sync_sub<mode>): Likewise.
+ (sync_old_add<mode>): Likewise.
+ (sync_old_sub<mode>): Likewise.
+ (sync_new_add<mode>): Likewise.
+ (sync_new_sub<mode>): Likewise.
+ (sync_<optab><mode>): Likewise.
+ (sync_old_<optab><mode>): Likewise.
+ (sync_new_<optab><mode>): Likewise.
+ (sync_nand<mode>): Likewise.
+ (sync_old_nand<mode>): Likewise.
+ (sync_new_nand<mode>): Likewise.
+ (sync_lock_test_and_set<mode>): Likewise.
+ (test_and_set_12): Likewise.
+ (atomic_compare_and_swap<mode>): Likewise.
+ (atomic_exchange<mode>_llsc): Likewise.
+ (atomic_fetch_add<mode>_llsc): Likewise.
+ * config/mips/mips-cpus.def (m14kc, m14k): New processors.
+ * config/mips/mips-protos.h (umips_output_save_restore): New prototype.
+ (umips_save_restore_pattern_p): Likewise.
+ (umips_load_store_pair_p): Likewise.
+ (umips_output_load_store_pair): Likewise.
+ (umips_movep_target_p): Likewise.
+ (umips_12bit_offset_address_p): Likewise.
+ * config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
+ (mips_base_mips16): Rename this...
+ (mips_base_compression_flags): ...to this. Update all uses.
+ (mips_attribute_table): Add micromips, nomicromips and nocompression.
+ (mips_mips16_decl_p): Delete.
+ (mips_nomips16_decl_p): Delete.
+ (mips_get_compress_on_flags): New function.
+ (mips_get_compress_off_flags): New function.
+ (mips_get_compress_mode): New function.
+ (mips_get_compress_on_name): New function.
+ (mips_get_compress_off_name): New function.
+ (mips_insert_attributes): Support multiple compression types.
+ (mips_merge_decl_attributes): Likewise.
+ (umips_12bit_offset_address_p): New function.
+ (mips_start_function_definition): Emit .set micromips directive.
+ (mips_call_may_need_jalx_p): New function.
+ (mips_function_ok_for_sibcall): Add microMIPS support.
+ (mips_print_operand_punctuation): Support short delay slots and
+ compact jumps.
+ (umips_swm_mask, umips_swm_encoding): New.
+ (umips_build_save_restore): New function.
+ (mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
+ (was_mips16_p): Remove.
+ (old_compression_mode): New.
+ (mips_set_compression_mode): New function.
+ (mips_set_current_function): Add microMIPS support.
+ (mips_option_override): Likewise.
+ (umips_save_restore_pattern_p): New function.
+ (umips_output_save_restore): New function.
+ (umips_load_store_pair_p_1): New function.
+ (umips_load_store_pair_p): New function.
+ (umips_output_load_store_pair_1): New function.
+ (umips_output_load_store_pair): New function.
+ (umips_movep_target_p) New function.
+ (mips_prepare_pch_save): Add microMIPS support.
+ * config/mips/mips.h (TARGET_COMPRESSION): New.
+ (TARGET_CPU_CPP_BUILTINS): Update macro
+ to use new compression flags and to support microMIPS.
+ (MIPS_ISA_LEVEL_SPEC): Add m14k processors.
+ (MIPS_ARCH_FLOAT_SPEC): Likewise.
+ (ISA_HAS_LWXS): Include TARGET_MICROMIPS.
+ (ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
+ (ASM_SPEC): Support mmicromips and mno-micromips.
+ (M16STORE_REG_P): New macro.
+ (MIPS_CALL): Support TARGET_MICROMIPS.
+ (MICROMIPS_J): New macro.
+ (mips_base_mips16): Rename this...
+ (mips_base_compression_flags): ...to this.
+ (UMIPS_12BIT_OFFSET_P): New macro.
+ * config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
+ (MULTILIB_DIRNAMES): Likewise.
+
+2013-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52555
+ * target-globals.c (save_target_globals): For init_reg_sets and
+ target_reinit remporarily set this_fn_optabs to this_target_optabs.
+
2013-02-22 James Grennahlgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64-simd-builtins.def: Add copyright header.
@@ -23,10 +627,10 @@
2013-02-22 Greta Yorsh <Greta.Yorsh@arm.com>
- * config/arm/arm.md (split for extendsidi): Update condition.
- (zero_extend<mode>di2,extend<mode>di2): Add an alternative.
- * config/arm/iterators.md (qhs_extenddi_cstr): Likewise.
- (qhs_zextenddi_cstr): Likewise.
+ * config/arm/arm.md (split for extendsidi): Update condition.
+ (zero_extend<mode>di2,extend<mode>di2): Add an alternative.
+ * config/arm/iterators.md (qhs_extenddi_cstr): Likewise.
+ (qhs_zextenddi_cstr): Likewise.
2013-02-21 Jakub Jelinek <jakub@redhat.com>
@@ -181,7 +785,7 @@
* config/microblaze/microblaze.h: Add TARGET_HAS_CLZ as combined
version and TARGET_PATTERN_COMPARE check
* config/microblaze/microblaze.md: New clzsi2 instruction
-
+
2012-02-19 Edgar E. Iglesias <edgar.iglesias@gmail.com>
* config/microblaze/microblaze.md (call_value_intern): Check symbol is
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 5070074bee8..c787ca9fef8 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20130224
+20130303
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 00bb9386393..d0a91990412 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -919,7 +919,7 @@ PREDICT_H = predict.h predict.def
CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \
$(srcdir)/../libcpp/include/cpplib.h
INPUT_H = $(srcdir)/../libcpp/include/line-map.h input.h
-OPTS_H = $(INPUT_H) $(VEC_H) opts.h
+OPTS_H = $(INPUT_H) $(VEC_H) opts.h $(OBSTACK_H)
DECNUM_H = $(DECNUM)/decContext.h $(DECNUM)/decDPD.h $(DECNUM)/decNumber.h \
$(DECNUMFMT)/decimal32.h $(DECNUMFMT)/decimal64.h \
$(DECNUMFMT)/decimal128.h $(DECNUMFMT)/decimal128Local.h
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d23568fedd6..0b5c67ec35b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/ada-tree.h: Back out change accidentally committed.
+
2013-02-21 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/56258
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index 15d1cdd1e82..ec00cc4775f 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2013, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2012, 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- *
@@ -507,11 +507,5 @@ do { \
#define LOOP_STMT_BOTTOM_COND_P(NODE) TREE_LANG_FLAG_0 (LOOP_STMT_CHECK (NODE))
#define LOOP_STMT_TOP_UPDATE_P(NODE) TREE_LANG_FLAG_1 (LOOP_STMT_CHECK (NODE))
-/* Optimization hints on loops. */
-#define LOOP_STMT_NO_UNROLL(NODE) TREE_LANG_FLAG_2 (LOOP_STMT_CHECK (NODE))
-#define LOOP_STMT_UNROLL(NODE) TREE_LANG_FLAG_3 (LOOP_STMT_CHECK (NODE))
-#define LOOP_STMT_NO_VECTOR(NODE) TREE_LANG_FLAG_4 (LOOP_STMT_CHECK (NODE))
-#define LOOP_STMT_VECTOR(NODE) TREE_LANG_FLAG_5 (LOOP_STMT_CHECK (NODE))
-
#define EXIT_STMT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 0)
#define EXIT_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 1)
diff --git a/gcc/asan.c b/gcc/asan.c
index 67236a92e48..52a2dbc5dfd 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -2277,7 +2277,7 @@ static bool
gate_asan (void)
{
return flag_asan != 0
- && !lookup_attribute ("no_address_safety_analysis",
+ && !lookup_attribute ("no_sanitize_address",
DECL_ATTRIBUTES (current_function_decl));
}
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 50ad1016f7c..c1ad40b02a7 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,13 @@
+2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/56454
+ * c-common.c (handle_no_sanitize_address_attribute): New function.
+ (c_common_attribute_table): Add no_sanitize_address attribute.
+ (handle_no_address_safety_analysis_attribute): Add
+ no_sanitize_address attribute, not no_address_safety_analysis
+ attribute.
+
2013-02-18 Aldy Hernandez <aldyh@redhat.com>
PR target/52555
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index a1d47a68045..d01de3e40d5 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -307,6 +307,8 @@ static tree handle_common_attribute (tree *, tree, tree, int, bool *);
static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
static tree handle_hot_attribute (tree *, tree, tree, int, bool *);
static tree handle_cold_attribute (tree *, tree, tree, int, bool *);
+static tree handle_no_sanitize_address_attribute (tree *, tree, tree,
+ int, bool *);
static tree handle_no_address_safety_analysis_attribute (tree *, tree, tree,
int, bool *);
static tree handle_noinline_attribute (tree *, tree, tree, int, bool *);
@@ -715,6 +717,9 @@ const struct attribute_spec c_common_attribute_table[] =
0, 0, true, false, false,
handle_no_address_safety_analysis_attribute,
false },
+ { "no_sanitize_address", 0, 0, true, false, false,
+ handle_no_sanitize_address_attribute,
+ false },
{ "warning", 1, 1, true, false, false,
handle_error_attribute, false },
{ "error", 1, 1, true, false, false,
@@ -6505,12 +6510,12 @@ handle_cold_attribute (tree *node, tree name, tree ARG_UNUSED (args),
return NULL_TREE;
}
-/* Handle a "no_address_safety_analysis" attribute; arguments as in
+/* Handle a "no_sanitize_address" attribute; arguments as in
struct attribute_spec.handler. */
static tree
-handle_no_address_safety_analysis_attribute (tree *node, tree name, tree, int,
- bool *no_add_attrs)
+handle_no_sanitize_address_attribute (tree *node, tree name, tree, int,
+ bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
@@ -6521,6 +6526,23 @@ handle_no_address_safety_analysis_attribute (tree *node, tree name, tree, int,
return NULL_TREE;
}
+/* Handle a "no_address_safety_analysis" attribute; arguments as in
+ struct attribute_spec.handler. */
+
+static tree
+handle_no_address_safety_analysis_attribute (tree *node, tree name, tree, int,
+ bool *no_add_attrs)
+{
+ if (TREE_CODE (*node) != FUNCTION_DECL)
+ warning (OPT_Wattributes, "%qE attribute ignored", name);
+ else if (!lookup_attribute ("no_sanitize_address", DECL_ATTRIBUTES (*node)))
+ DECL_ATTRIBUTES (*node)
+ = tree_cons (get_identifier ("no_sanitize_address"),
+ NULL_TREE, DECL_ATTRIBUTES (*node));
+ *no_add_attrs = true;
+ return NULL_TREE;
+}
+
/* Handle a "noinline" attribute; arguments as in
struct attribute_spec.handler. */
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index c6ed44f8a7e..ec1ba9ad71c 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -135,7 +135,7 @@ delete_insn (rtx insn)
if (! can_delete_label_p (insn))
{
const char *name = LABEL_NAME (insn);
- basic_block bb, label_bb = BLOCK_FOR_INSN (insn);
+ basic_block bb = BLOCK_FOR_INSN (insn);
rtx bb_note = NEXT_INSN (insn);
really_delete = false;
@@ -144,15 +144,13 @@ delete_insn (rtx insn)
NOTE_DELETED_LABEL_NAME (insn) = name;
/* If the note following the label starts a basic block, and the
- label is a member of the same basic block, interchange the two.
- If the label is not marked with a bb, assume it's the same bb. */
+ label is a member of the same basic block, interchange the two. */
if (bb_note != NULL_RTX
&& NOTE_INSN_BASIC_BLOCK_P (bb_note)
- && (label_bb == NOTE_BASIC_BLOCK (bb_note)
- || label_bb == NULL))
+ && bb != NULL
+ && bb == BLOCK_FOR_INSN (bb_note))
{
reorder_insns_nobb (insn, insn, bb_note);
- bb = NOTE_BASIC_BLOCK (bb_note);
BB_HEAD (bb) = bb_note;
if (BB_END (bb) == bb_note)
BB_END (bb) = insn;
diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index dfa7b8c4e85..1ea55a83eb8 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -309,7 +309,7 @@ static GTY(()) tree aarch64_builtin_decls[AARCH64_BUILTIN_MAX];
#define NUM_DREG_TYPES 6
#define NUM_QREG_TYPES 6
-void
+static void
aarch64_init_simd_builtins (void)
{
unsigned int i, fcode = AARCH64_SIMD_BUILTIN_BASE + 1;
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 85668dab254..8c8532c97cc 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5986,7 +5986,7 @@ static aarch64_simd_mangle_map_entry aarch64_simd_mangle_map[] = {
/* Implement TARGET_MANGLE_TYPE. */
-const char *
+static const char *
aarch64_mangle_type (const_tree type)
{
/* The AArch64 ABI documents say that "__va_list" has to be
@@ -6586,7 +6586,7 @@ aarch64_simd_dup_constant (rtx vals)
constants (for vec_init) or CONST_VECTOR, efficiently into a
register. Returns an RTX to copy into the register, or NULL_RTX
for a PARALLEL that can not be converted into a CONST_VECTOR. */
-rtx
+static rtx
aarch64_simd_make_constant (rtx vals)
{
enum machine_mode mode = GET_MODE (vals);
@@ -7088,7 +7088,7 @@ aarch64_float_const_representable_p (rtx x)
/* This represents our current view of how many bits
make up the mantissa. */
int point_pos = 2 * HOST_BITS_PER_WIDE_INT - 1;
- int sign, exponent;
+ int exponent;
unsigned HOST_WIDE_INT mantissa, mask;
HOST_WIDE_INT m1, m2;
REAL_VALUE_TYPE r, m;
@@ -7105,8 +7105,7 @@ aarch64_float_const_representable_p (rtx x)
|| REAL_VALUE_MINUS_ZERO (r))
return false;
- /* Extract sign and exponent. */
- sign = REAL_VALUE_NEGATIVE (r) ? 1 : 0;
+ /* Extract exponent. */
r = real_value_abs (&r);
exponent = REAL_EXP (&r);
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 677d6da027d..c720561f165 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -24313,6 +24313,8 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
if (mi_delta < 0)
mi_delta = - mi_delta;
+ final_start_function (emit_barrier (), file, 1);
+
if (TARGET_THUMB1)
{
int labelno = thunk_label++;
@@ -24429,6 +24431,8 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
fputs ("(PLT)", file);
fputc ('\n', file);
}
+
+ final_end_function ();
}
int
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index b4100840431..2a730ac7a19 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -28,11 +28,8 @@
- $(srcdir)/doc/avr-mmcu.texi
After that, rebuild everything and check-in the new sources to the repo.
- The device list below has to be kept in sync with the following places:
+ The device list below has to be kept in sync with AVR-LibC.
- - here
- - gas/config/tc-avr.c
- - avr-libc
Before including this file, define a macro:
@@ -79,6 +76,7 @@ AVR_MCU ("at90s8535", ARCH_AVR2, "__AVR_AT90S8535__", 0, 0, 0
/* 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")
@@ -114,18 +112,24 @@ AVR_MCU ("atmega103", ARCH_AVR31, "__AVR_ATmega103__", 0, 1, 0
AVR_MCU ("at43usb320", ARCH_AVR31, "__AVR_AT43USB320__", 0, 0, 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")
/* 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")
@@ -141,6 +145,9 @@ AVR_MCU ("at90pwm3b", ARCH_AVR4, "__AVR_AT90PWM3B__", 0, 0, 0
AVR_MCU ("at90pwm81", ARCH_AVR4, "__AVR_AT90PWM81__", 0, 0, 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")
@@ -148,17 +155,28 @@ AVR_MCU ("atmega162", ARCH_AVR5, "__AVR_ATmega162__", 0, 0, 0
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 ("atmega16hva", ARCH_AVR5, "__AVR_ATmega16HVA__", 0, 0, 0x0100, 1, "m16hva")
+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 ("atmega32a", ARCH_AVR5, "__AVR_ATmega32A__", 0, 0, 0x0060, 1, "m32a")
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")
@@ -169,6 +187,7 @@ AVR_MCU ("atmega325p", ARCH_AVR5, "__AVR_ATmega325P__", 0, 0, 0
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")
@@ -178,8 +197,14 @@ AVR_MCU ("atmega329pa", ARCH_AVR5, "__AVR_ATmega329PA__", 0, 0, 0
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")
@@ -199,9 +224,20 @@ AVR_MCU ("atmega16hva", ARCH_AVR5, "__AVR_ATmega16HVA__", 0, 0, 0
AVR_MCU ("atmega16hva2", ARCH_AVR5, "__AVR_ATmega16HVA2__", 0, 0, 0x0100, 1, "m16hva2")
AVR_MCU ("atmega16hvb", ARCH_AVR5, "__AVR_ATmega16HVB__", 0, 0, 0x0100, 1, "m16hvb")
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 ("atmega32hvb", ARCH_AVR5, "__AVR_ATmega32HVB__", 0, 0, 0x0100, 1, "m32hvb")
+AVR_MCU ("atmega32hvbrevb", ARCH_AVR5, "__AVR_ATmega32HVBREVB__", 0, 0, 0x0100, 1, "m32hvbrevb")
+AVR_MCU ("atmega16hva2", ARCH_AVR5, "__AVR_ATmega16HVA2__", 0, 0, 0x0100, 1, "m16hva2")
+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 ("atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__", 0, 0, 0x0100, 1, "m32c1")
@@ -220,8 +256,10 @@ AVR_MCU ("m3000", ARCH_AVR5, "__AVR_M3000__", 0, 0, 0
/* 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")
@@ -239,16 +277,31 @@ AVR_MCU ("atxmega16x1", ARCH_AVRXMEGA2, "__AVR_ATxmega16X1__", 0, 0, 0
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")
/* 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")
/* 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")
/* Xmega, 128K < Flash, RAM <= 64K */
-AVR_MCU ("avrxmega6", ARCH_AVRXMEGA6, NULL, 0, 0, 0x2000, 5, "x128a3")
+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")
@@ -257,10 +310,24 @@ AVR_MCU ("atxmega256a3", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3__", 0, 0, 0
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")
/* 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")
/* 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")
diff --git a/gcc/config/avr/avr-tables.opt b/gcc/config/avr/avr-tables.opt
index 329c3b19069..1a451bda4b6 100644
--- a/gcc/config/avr/avr-tables.opt
+++ b/gcc/config/avr/avr-tables.opt
@@ -69,530 +69,740 @@ EnumValue
Enum(avr_mcu) String(ata6289) Value(14)
EnumValue
-Enum(avr_mcu) String(attiny13) Value(15)
+Enum(avr_mcu) String(ata5272) Value(15)
EnumValue
-Enum(avr_mcu) String(attiny13a) Value(16)
+Enum(avr_mcu) String(attiny13) Value(16)
EnumValue
-Enum(avr_mcu) String(attiny2313) Value(17)
+Enum(avr_mcu) String(attiny13a) Value(17)
EnumValue
-Enum(avr_mcu) String(attiny2313a) Value(18)
+Enum(avr_mcu) String(attiny2313) Value(18)
EnumValue
-Enum(avr_mcu) String(attiny24) Value(19)
+Enum(avr_mcu) String(attiny2313a) Value(19)
EnumValue
-Enum(avr_mcu) String(attiny24a) Value(20)
+Enum(avr_mcu) String(attiny24) Value(20)
EnumValue
-Enum(avr_mcu) String(attiny4313) Value(21)
+Enum(avr_mcu) String(attiny24a) Value(21)
EnumValue
-Enum(avr_mcu) String(attiny44) Value(22)
+Enum(avr_mcu) String(attiny4313) Value(22)
EnumValue
-Enum(avr_mcu) String(attiny44a) Value(23)
+Enum(avr_mcu) String(attiny44) Value(23)
EnumValue
-Enum(avr_mcu) String(attiny84) Value(24)
+Enum(avr_mcu) String(attiny44a) Value(24)
EnumValue
-Enum(avr_mcu) String(attiny84a) Value(25)
+Enum(avr_mcu) String(attiny84) Value(25)
EnumValue
-Enum(avr_mcu) String(attiny25) Value(26)
+Enum(avr_mcu) String(attiny84a) Value(26)
EnumValue
-Enum(avr_mcu) String(attiny45) Value(27)
+Enum(avr_mcu) String(attiny25) Value(27)
EnumValue
-Enum(avr_mcu) String(attiny85) Value(28)
+Enum(avr_mcu) String(attiny45) Value(28)
EnumValue
-Enum(avr_mcu) String(attiny261) Value(29)
+Enum(avr_mcu) String(attiny85) Value(29)
EnumValue
-Enum(avr_mcu) String(attiny261a) Value(30)
+Enum(avr_mcu) String(attiny261) Value(30)
EnumValue
-Enum(avr_mcu) String(attiny461) Value(31)
+Enum(avr_mcu) String(attiny261a) Value(31)
EnumValue
-Enum(avr_mcu) String(attiny461a) Value(32)
+Enum(avr_mcu) String(attiny461) Value(32)
EnumValue
-Enum(avr_mcu) String(attiny861) Value(33)
+Enum(avr_mcu) String(attiny461a) Value(33)
EnumValue
-Enum(avr_mcu) String(attiny861a) Value(34)
+Enum(avr_mcu) String(attiny861) Value(34)
EnumValue
-Enum(avr_mcu) String(attiny43u) Value(35)
+Enum(avr_mcu) String(attiny861a) Value(35)
EnumValue
-Enum(avr_mcu) String(attiny87) Value(36)
+Enum(avr_mcu) String(attiny43u) Value(36)
EnumValue
-Enum(avr_mcu) String(attiny48) Value(37)
+Enum(avr_mcu) String(attiny87) Value(37)
EnumValue
-Enum(avr_mcu) String(attiny88) Value(38)
+Enum(avr_mcu) String(attiny48) Value(38)
EnumValue
-Enum(avr_mcu) String(at86rf401) Value(39)
+Enum(avr_mcu) String(attiny88) Value(39)
EnumValue
-Enum(avr_mcu) String(avr3) Value(40)
+Enum(avr_mcu) String(at86rf401) Value(40)
EnumValue
-Enum(avr_mcu) String(at43usb355) Value(41)
+Enum(avr_mcu) String(avr3) Value(41)
EnumValue
-Enum(avr_mcu) String(at76c711) Value(42)
+Enum(avr_mcu) String(at43usb355) Value(42)
EnumValue
-Enum(avr_mcu) String(avr31) Value(43)
+Enum(avr_mcu) String(at76c711) Value(43)
EnumValue
-Enum(avr_mcu) String(atmega103) Value(44)
+Enum(avr_mcu) String(avr31) Value(44)
EnumValue
-Enum(avr_mcu) String(at43usb320) Value(45)
+Enum(avr_mcu) String(atmega103) Value(45)
EnumValue
-Enum(avr_mcu) String(avr35) Value(46)
+Enum(avr_mcu) String(at43usb320) Value(46)
EnumValue
-Enum(avr_mcu) String(at90usb82) Value(47)
+Enum(avr_mcu) String(avr35) Value(47)
EnumValue
-Enum(avr_mcu) String(at90usb162) Value(48)
+Enum(avr_mcu) String(ata5505) Value(48)
EnumValue
-Enum(avr_mcu) String(atmega8u2) Value(49)
+Enum(avr_mcu) String(at90usb82) Value(49)
EnumValue
-Enum(avr_mcu) String(atmega16u2) Value(50)
+Enum(avr_mcu) String(at90usb162) Value(50)
EnumValue
-Enum(avr_mcu) String(atmega32u2) Value(51)
+Enum(avr_mcu) String(atmega8u2) Value(51)
EnumValue
-Enum(avr_mcu) String(attiny167) Value(52)
+Enum(avr_mcu) String(atmega16u2) Value(52)
EnumValue
-Enum(avr_mcu) String(avr4) Value(53)
+Enum(avr_mcu) String(atmega32u2) Value(53)
EnumValue
-Enum(avr_mcu) String(atmega8) Value(54)
+Enum(avr_mcu) String(attiny167) Value(54)
EnumValue
-Enum(avr_mcu) String(atmega48) Value(55)
+Enum(avr_mcu) String(attiny1634) Value(55)
EnumValue
-Enum(avr_mcu) String(atmega48a) Value(56)
+Enum(avr_mcu) String(avr4) Value(56)
EnumValue
-Enum(avr_mcu) String(atmega48p) Value(57)
+Enum(avr_mcu) String(ata6285) Value(57)
EnumValue
-Enum(avr_mcu) String(atmega88) Value(58)
+Enum(avr_mcu) String(ata6286) Value(58)
EnumValue
-Enum(avr_mcu) String(atmega88a) Value(59)
+Enum(avr_mcu) String(atmega8) Value(59)
EnumValue
-Enum(avr_mcu) String(atmega88p) Value(60)
+Enum(avr_mcu) String(atmega8a) Value(60)
EnumValue
-Enum(avr_mcu) String(atmega88pa) Value(61)
+Enum(avr_mcu) String(atmega48) Value(61)
EnumValue
-Enum(avr_mcu) String(atmega8515) Value(62)
+Enum(avr_mcu) String(atmega48a) Value(62)
EnumValue
-Enum(avr_mcu) String(atmega8535) Value(63)
+Enum(avr_mcu) String(atmega48p) Value(63)
EnumValue
-Enum(avr_mcu) String(atmega8hva) Value(64)
+Enum(avr_mcu) String(atmega48pa) Value(64)
EnumValue
-Enum(avr_mcu) String(at90pwm1) Value(65)
+Enum(avr_mcu) String(atmega88) Value(65)
EnumValue
-Enum(avr_mcu) String(at90pwm2) Value(66)
+Enum(avr_mcu) String(atmega88a) Value(66)
EnumValue
-Enum(avr_mcu) String(at90pwm2b) Value(67)
+Enum(avr_mcu) String(atmega88p) Value(67)
EnumValue
-Enum(avr_mcu) String(at90pwm3) Value(68)
+Enum(avr_mcu) String(atmega88pa) Value(68)
EnumValue
-Enum(avr_mcu) String(at90pwm3b) Value(69)
+Enum(avr_mcu) String(atmega8515) Value(69)
EnumValue
-Enum(avr_mcu) String(at90pwm81) Value(70)
+Enum(avr_mcu) String(atmega8535) Value(70)
EnumValue
-Enum(avr_mcu) String(avr5) Value(71)
+Enum(avr_mcu) String(atmega8hva) Value(71)
EnumValue
-Enum(avr_mcu) String(atmega16) Value(72)
+Enum(avr_mcu) String(at90pwm1) Value(72)
EnumValue
-Enum(avr_mcu) String(atmega16a) Value(73)
+Enum(avr_mcu) String(at90pwm2) Value(73)
EnumValue
-Enum(avr_mcu) String(atmega161) Value(74)
+Enum(avr_mcu) String(at90pwm2b) Value(74)
EnumValue
-Enum(avr_mcu) String(atmega162) Value(75)
+Enum(avr_mcu) String(at90pwm3) Value(75)
EnumValue
-Enum(avr_mcu) String(atmega163) Value(76)
+Enum(avr_mcu) String(at90pwm3b) Value(76)
EnumValue
-Enum(avr_mcu) String(atmega164a) Value(77)
+Enum(avr_mcu) String(at90pwm81) Value(77)
EnumValue
-Enum(avr_mcu) String(atmega164p) Value(78)
+Enum(avr_mcu) String(avr5) Value(78)
EnumValue
-Enum(avr_mcu) String(atmega165) Value(79)
+Enum(avr_mcu) String(ata5790) Value(79)
EnumValue
-Enum(avr_mcu) String(atmega165a) Value(80)
+Enum(avr_mcu) String(ata5790n) Value(80)
EnumValue
-Enum(avr_mcu) String(atmega165p) Value(81)
+Enum(avr_mcu) String(ata5795) Value(81)
EnumValue
-Enum(avr_mcu) String(atmega168) Value(82)
+Enum(avr_mcu) String(atmega16) Value(82)
EnumValue
-Enum(avr_mcu) String(atmega168a) Value(83)
+Enum(avr_mcu) String(atmega16a) Value(83)
EnumValue
-Enum(avr_mcu) String(atmega168p) Value(84)
+Enum(avr_mcu) String(atmega161) Value(84)
EnumValue
-Enum(avr_mcu) String(atmega169) Value(85)
+Enum(avr_mcu) String(atmega162) Value(85)
EnumValue
-Enum(avr_mcu) String(atmega169a) Value(86)
+Enum(avr_mcu) String(atmega163) Value(86)
EnumValue
-Enum(avr_mcu) String(atmega169p) Value(87)
+Enum(avr_mcu) String(atmega164a) Value(87)
EnumValue
-Enum(avr_mcu) String(atmega169pa) Value(88)
+Enum(avr_mcu) String(atmega164p) Value(88)
EnumValue
-Enum(avr_mcu) String(atmega32) Value(89)
+Enum(avr_mcu) String(atmega164pa) Value(89)
EnumValue
-Enum(avr_mcu) String(atmega323) Value(90)
+Enum(avr_mcu) String(atmega165) Value(90)
EnumValue
-Enum(avr_mcu) String(atmega324a) Value(91)
+Enum(avr_mcu) String(atmega165a) Value(91)
EnumValue
-Enum(avr_mcu) String(atmega324p) Value(92)
+Enum(avr_mcu) String(atmega165p) Value(92)
EnumValue
-Enum(avr_mcu) String(atmega324pa) Value(93)
+Enum(avr_mcu) String(atmega165pa) Value(93)
EnumValue
-Enum(avr_mcu) String(atmega325) Value(94)
+Enum(avr_mcu) String(atmega168) Value(94)
EnumValue
-Enum(avr_mcu) String(atmega325a) Value(95)
+Enum(avr_mcu) String(atmega168a) Value(95)
EnumValue
-Enum(avr_mcu) String(atmega325p) Value(96)
+Enum(avr_mcu) String(atmega168p) Value(96)
EnumValue
-Enum(avr_mcu) String(atmega3250) Value(97)
+Enum(avr_mcu) String(atmega168pa) Value(97)
EnumValue
-Enum(avr_mcu) String(atmega3250a) Value(98)
+Enum(avr_mcu) String(atmega169) Value(98)
EnumValue
-Enum(avr_mcu) String(atmega3250p) Value(99)
+Enum(avr_mcu) String(atmega169a) Value(99)
EnumValue
-Enum(avr_mcu) String(atmega328) Value(100)
+Enum(avr_mcu) String(atmega169p) Value(100)
EnumValue
-Enum(avr_mcu) String(atmega328p) Value(101)
+Enum(avr_mcu) String(atmega169pa) Value(101)
EnumValue
-Enum(avr_mcu) String(atmega329) Value(102)
+Enum(avr_mcu) String(atmega16hva) Value(102)
EnumValue
-Enum(avr_mcu) String(atmega329a) Value(103)
+Enum(avr_mcu) String(atmega16hvb) Value(103)
EnumValue
-Enum(avr_mcu) String(atmega329p) Value(104)
+Enum(avr_mcu) String(atmega16hvbrevb) Value(104)
EnumValue
-Enum(avr_mcu) String(atmega329pa) Value(105)
+Enum(avr_mcu) String(atmega16m1) Value(105)
EnumValue
-Enum(avr_mcu) String(atmega3290) Value(106)
+Enum(avr_mcu) String(atmega16u4) Value(106)
EnumValue
-Enum(avr_mcu) String(atmega3290a) Value(107)
+Enum(avr_mcu) String(atmega26hvg) Value(107)
EnumValue
-Enum(avr_mcu) String(atmega3290p) Value(108)
+Enum(avr_mcu) String(atmega32a) Value(108)
EnumValue
-Enum(avr_mcu) String(atmega406) Value(109)
+Enum(avr_mcu) String(atmega32) Value(109)
EnumValue
-Enum(avr_mcu) String(atmega64) Value(110)
+Enum(avr_mcu) String(atmega32a) Value(110)
EnumValue
-Enum(avr_mcu) String(atmega640) Value(111)
+Enum(avr_mcu) String(atmega323) Value(111)
EnumValue
-Enum(avr_mcu) String(atmega644) Value(112)
+Enum(avr_mcu) String(atmega324a) Value(112)
EnumValue
-Enum(avr_mcu) String(atmega644a) Value(113)
+Enum(avr_mcu) String(atmega324p) Value(113)
EnumValue
-Enum(avr_mcu) String(atmega644p) Value(114)
+Enum(avr_mcu) String(atmega324pa) Value(114)
EnumValue
-Enum(avr_mcu) String(atmega644pa) Value(115)
+Enum(avr_mcu) String(atmega325) Value(115)
EnumValue
-Enum(avr_mcu) String(atmega645) Value(116)
+Enum(avr_mcu) String(atmega325a) Value(116)
EnumValue
-Enum(avr_mcu) String(atmega645a) Value(117)
+Enum(avr_mcu) String(atmega325p) Value(117)
EnumValue
-Enum(avr_mcu) String(atmega645p) Value(118)
+Enum(avr_mcu) String(atmega3250) Value(118)
EnumValue
-Enum(avr_mcu) String(atmega6450) Value(119)
+Enum(avr_mcu) String(atmega3250a) Value(119)
EnumValue
-Enum(avr_mcu) String(atmega6450a) Value(120)
+Enum(avr_mcu) String(atmega3250p) Value(120)
EnumValue
-Enum(avr_mcu) String(atmega6450p) Value(121)
+Enum(avr_mcu) String(atmega3250pa) Value(121)
EnumValue
-Enum(avr_mcu) String(atmega649) Value(122)
+Enum(avr_mcu) String(atmega328) Value(122)
EnumValue
-Enum(avr_mcu) String(atmega649a) Value(123)
+Enum(avr_mcu) String(atmega328p) Value(123)
EnumValue
-Enum(avr_mcu) String(atmega649p) Value(124)
+Enum(avr_mcu) String(atmega329) Value(124)
EnumValue
-Enum(avr_mcu) String(atmega6490) Value(125)
+Enum(avr_mcu) String(atmega329a) Value(125)
EnumValue
-Enum(avr_mcu) String(atmega16hva) Value(126)
+Enum(avr_mcu) String(atmega329p) Value(126)
EnumValue
-Enum(avr_mcu) String(atmega16hva2) Value(127)
+Enum(avr_mcu) String(atmega329pa) Value(127)
EnumValue
-Enum(avr_mcu) String(atmega16hvb) Value(128)
+Enum(avr_mcu) String(atmega3290) Value(128)
EnumValue
-Enum(avr_mcu) String(atmega32hvb) Value(129)
+Enum(avr_mcu) String(atmega3290a) Value(129)
EnumValue
-Enum(avr_mcu) String(atmega64hve) Value(130)
+Enum(avr_mcu) String(atmega3290p) Value(130)
EnumValue
-Enum(avr_mcu) String(at90can32) Value(131)
+Enum(avr_mcu) String(atmega3290pa) Value(131)
EnumValue
-Enum(avr_mcu) String(at90can64) Value(132)
+Enum(avr_mcu) String(atmega32c1) Value(132)
EnumValue
-Enum(avr_mcu) String(at90pwm216) Value(133)
+Enum(avr_mcu) String(atmega32m1) Value(133)
EnumValue
-Enum(avr_mcu) String(at90pwm316) Value(134)
+Enum(avr_mcu) String(atmega32u4) Value(134)
EnumValue
-Enum(avr_mcu) String(atmega32c1) Value(135)
+Enum(avr_mcu) String(atmega32u6) Value(135)
EnumValue
-Enum(avr_mcu) String(atmega64c1) Value(136)
+Enum(avr_mcu) String(atmega406) Value(136)
EnumValue
-Enum(avr_mcu) String(atmega16m1) Value(137)
+Enum(avr_mcu) String(atmega64) Value(137)
EnumValue
-Enum(avr_mcu) String(atmega32m1) Value(138)
+Enum(avr_mcu) String(atmega64a) Value(138)
EnumValue
-Enum(avr_mcu) String(atmega64m1) Value(139)
+Enum(avr_mcu) String(atmega640) Value(139)
EnumValue
-Enum(avr_mcu) String(atmega16u4) Value(140)
+Enum(avr_mcu) String(atmega644) Value(140)
EnumValue
-Enum(avr_mcu) String(atmega32u4) Value(141)
+Enum(avr_mcu) String(atmega644a) Value(141)
EnumValue
-Enum(avr_mcu) String(atmega32u6) Value(142)
+Enum(avr_mcu) String(atmega644p) Value(142)
EnumValue
-Enum(avr_mcu) String(at90scr100) Value(143)
+Enum(avr_mcu) String(atmega644pa) Value(143)
EnumValue
-Enum(avr_mcu) String(at90usb646) Value(144)
+Enum(avr_mcu) String(atmega645) Value(144)
EnumValue
-Enum(avr_mcu) String(at90usb647) Value(145)
+Enum(avr_mcu) String(atmega645a) Value(145)
EnumValue
-Enum(avr_mcu) String(at94k) Value(146)
+Enum(avr_mcu) String(atmega645p) Value(146)
EnumValue
-Enum(avr_mcu) String(m3000) Value(147)
+Enum(avr_mcu) String(atmega6450) Value(147)
EnumValue
-Enum(avr_mcu) String(avr51) Value(148)
+Enum(avr_mcu) String(atmega6450a) Value(148)
EnumValue
-Enum(avr_mcu) String(atmega128) Value(149)
+Enum(avr_mcu) String(atmega6450p) Value(149)
EnumValue
-Enum(avr_mcu) String(atmega1280) Value(150)
+Enum(avr_mcu) String(atmega649) Value(150)
EnumValue
-Enum(avr_mcu) String(atmega1281) Value(151)
+Enum(avr_mcu) String(atmega649a) Value(151)
EnumValue
-Enum(avr_mcu) String(atmega1284p) Value(152)
+Enum(avr_mcu) String(atmega649p) Value(152)
EnumValue
-Enum(avr_mcu) String(atmega128rfa1) Value(153)
+Enum(avr_mcu) String(atmega6490) Value(153)
EnumValue
-Enum(avr_mcu) String(at90can128) Value(154)
+Enum(avr_mcu) String(atmega16hva) Value(154)
EnumValue
-Enum(avr_mcu) String(at90usb1286) Value(155)
+Enum(avr_mcu) String(atmega16hva2) Value(155)
EnumValue
-Enum(avr_mcu) String(at90usb1287) Value(156)
+Enum(avr_mcu) String(atmega16hvb) Value(156)
EnumValue
-Enum(avr_mcu) String(avr6) Value(157)
+Enum(avr_mcu) String(atmega32hvb) Value(157)
EnumValue
-Enum(avr_mcu) String(atmega2560) Value(158)
+Enum(avr_mcu) String(atmega6490a) Value(158)
EnumValue
-Enum(avr_mcu) String(atmega2561) Value(159)
+Enum(avr_mcu) String(atmega6490p) Value(159)
EnumValue
-Enum(avr_mcu) String(avrxmega2) Value(160)
+Enum(avr_mcu) String(atmega64c1) Value(160)
EnumValue
-Enum(avr_mcu) String(atxmega16a4) Value(161)
+Enum(avr_mcu) String(atmega64m1) Value(161)
EnumValue
-Enum(avr_mcu) String(atxmega16d4) Value(162)
+Enum(avr_mcu) String(atmega64hve) Value(162)
EnumValue
-Enum(avr_mcu) String(atxmega16x1) Value(163)
+Enum(avr_mcu) String(atmega64rfa2) Value(163)
EnumValue
-Enum(avr_mcu) String(atxmega32a4) Value(164)
+Enum(avr_mcu) String(atmega64rfr2) Value(164)
EnumValue
-Enum(avr_mcu) String(atxmega32d4) Value(165)
+Enum(avr_mcu) String(atmega32hvb) Value(165)
EnumValue
-Enum(avr_mcu) String(atxmega32x1) Value(166)
+Enum(avr_mcu) String(atmega32hvbrevb) Value(166)
EnumValue
-Enum(avr_mcu) String(avrxmega4) Value(167)
+Enum(avr_mcu) String(atmega16hva2) Value(167)
EnumValue
-Enum(avr_mcu) String(atxmega64a3) Value(168)
+Enum(avr_mcu) String(atmega48hvf) Value(168)
EnumValue
-Enum(avr_mcu) String(atxmega64d3) Value(169)
+Enum(avr_mcu) String(at90can32) Value(169)
EnumValue
-Enum(avr_mcu) String(avrxmega5) Value(170)
+Enum(avr_mcu) String(at90can64) Value(170)
EnumValue
-Enum(avr_mcu) String(atxmega64a1) Value(171)
+Enum(avr_mcu) String(at90pwm161) Value(171)
EnumValue
-Enum(avr_mcu) String(atxmega64a1u) Value(172)
+Enum(avr_mcu) String(at90pwm216) Value(172)
EnumValue
-Enum(avr_mcu) String(avrxmega6) Value(173)
+Enum(avr_mcu) String(at90pwm316) Value(173)
EnumValue
-Enum(avr_mcu) String(atxmega128a3) Value(174)
+Enum(avr_mcu) String(atmega32c1) Value(174)
EnumValue
-Enum(avr_mcu) String(atxmega128d3) Value(175)
+Enum(avr_mcu) String(atmega64c1) Value(175)
EnumValue
-Enum(avr_mcu) String(atxmega192a3) Value(176)
+Enum(avr_mcu) String(atmega16m1) Value(176)
EnumValue
-Enum(avr_mcu) String(atxmega192d3) Value(177)
+Enum(avr_mcu) String(atmega32m1) Value(177)
EnumValue
-Enum(avr_mcu) String(atxmega256a3) Value(178)
+Enum(avr_mcu) String(atmega64m1) Value(178)
EnumValue
-Enum(avr_mcu) String(atxmega256a3b) Value(179)
+Enum(avr_mcu) String(atmega16u4) Value(179)
EnumValue
-Enum(avr_mcu) String(atxmega256a3bu) Value(180)
+Enum(avr_mcu) String(atmega32u4) Value(180)
EnumValue
-Enum(avr_mcu) String(atxmega256d3) Value(181)
+Enum(avr_mcu) String(atmega32u6) Value(181)
EnumValue
-Enum(avr_mcu) String(avrxmega7) Value(182)
+Enum(avr_mcu) String(at90scr100) Value(182)
EnumValue
-Enum(avr_mcu) String(atxmega128a1) Value(183)
+Enum(avr_mcu) String(at90usb646) Value(183)
EnumValue
-Enum(avr_mcu) String(atxmega128a1u) Value(184)
+Enum(avr_mcu) String(at90usb647) Value(184)
EnumValue
-Enum(avr_mcu) String(avr1) Value(185)
+Enum(avr_mcu) String(at94k) Value(185)
EnumValue
-Enum(avr_mcu) String(at90s1200) Value(186)
+Enum(avr_mcu) String(m3000) Value(186)
EnumValue
-Enum(avr_mcu) String(attiny11) Value(187)
+Enum(avr_mcu) String(avr51) Value(187)
EnumValue
-Enum(avr_mcu) String(attiny12) Value(188)
+Enum(avr_mcu) String(atmega128) Value(188)
EnumValue
-Enum(avr_mcu) String(attiny15) Value(189)
+Enum(avr_mcu) String(atmega128a) Value(189)
EnumValue
-Enum(avr_mcu) String(attiny28) Value(190)
+Enum(avr_mcu) String(atmega1280) Value(190)
+
+EnumValue
+Enum(avr_mcu) String(atmega1281) Value(191)
+
+EnumValue
+Enum(avr_mcu) String(atmega1284) Value(192)
+
+EnumValue
+Enum(avr_mcu) String(atmega1284p) Value(193)
+
+EnumValue
+Enum(avr_mcu) String(atmega128rfa1) Value(194)
+
+EnumValue
+Enum(avr_mcu) String(at90can128) Value(195)
+
+EnumValue
+Enum(avr_mcu) String(at90usb1286) Value(196)
+
+EnumValue
+Enum(avr_mcu) String(at90usb1287) Value(197)
+
+EnumValue
+Enum(avr_mcu) String(avr6) Value(198)
+
+EnumValue
+Enum(avr_mcu) String(atmega2560) Value(199)
+
+EnumValue
+Enum(avr_mcu) String(atmega2561) Value(200)
+
+EnumValue
+Enum(avr_mcu) String(avrxmega2) Value(201)
+
+EnumValue
+Enum(avr_mcu) String(atxmega16a4) Value(202)
+
+EnumValue
+Enum(avr_mcu) String(atxmega16d4) Value(203)
+
+EnumValue
+Enum(avr_mcu) String(atxmega16x1) Value(204)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32a4) Value(205)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32d4) Value(206)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32x1) Value(207)
+
+EnumValue
+Enum(avr_mcu) String(atmxt112sl) Value(208)
+
+EnumValue
+Enum(avr_mcu) String(atmxt224) Value(209)
+
+EnumValue
+Enum(avr_mcu) String(atmxt224e) Value(210)
+
+EnumValue
+Enum(avr_mcu) String(atmxt336s) Value(211)
+
+EnumValue
+Enum(avr_mcu) String(atxmega16a4u) Value(212)
+
+EnumValue
+Enum(avr_mcu) String(atxmega16c4) Value(213)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32a4u) Value(214)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32c4) Value(215)
+
+EnumValue
+Enum(avr_mcu) String(atxmega32e5) Value(216)
+
+EnumValue
+Enum(avr_mcu) String(avrxmega4) Value(217)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64a3) Value(218)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64d3) Value(219)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64a3u) Value(220)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64a4u) Value(221)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64b1) Value(222)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64b3) Value(223)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64c3) Value(224)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64d4) Value(225)
+
+EnumValue
+Enum(avr_mcu) String(avrxmega5) Value(226)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64a1) Value(227)
+
+EnumValue
+Enum(avr_mcu) String(atxmega64a1u) Value(228)
+
+EnumValue
+Enum(avr_mcu) String(avrxmega6) Value(229)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128a3) Value(230)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128d3) Value(231)
+
+EnumValue
+Enum(avr_mcu) String(atxmega192a3) Value(232)
+
+EnumValue
+Enum(avr_mcu) String(atxmega192d3) Value(233)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256a3) Value(234)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256a3b) Value(235)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256a3bu) Value(236)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256d3) Value(237)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128a3u) Value(238)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128b1) Value(239)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128b3) Value(240)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128c3) Value(241)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128d4) Value(242)
+
+EnumValue
+Enum(avr_mcu) String(atmxt540s) Value(243)
+
+EnumValue
+Enum(avr_mcu) String(atmxt540sreva) Value(244)
+
+EnumValue
+Enum(avr_mcu) String(atxmega192a3u) Value(245)
+
+EnumValue
+Enum(avr_mcu) String(atxmega192c3) Value(246)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256a3u) Value(247)
+
+EnumValue
+Enum(avr_mcu) String(atxmega256c3) Value(248)
+
+EnumValue
+Enum(avr_mcu) String(atxmega384c3) Value(249)
+
+EnumValue
+Enum(avr_mcu) String(atxmega384d3) Value(250)
+
+EnumValue
+Enum(avr_mcu) String(avrxmega7) Value(251)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128a1) Value(252)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128a1u) Value(253)
+
+EnumValue
+Enum(avr_mcu) String(atxmega128a4u) Value(254)
+
+EnumValue
+Enum(avr_mcu) String(avr1) Value(255)
+
+EnumValue
+Enum(avr_mcu) String(at90s1200) Value(256)
+
+EnumValue
+Enum(avr_mcu) String(attiny11) Value(257)
+
+EnumValue
+Enum(avr_mcu) String(attiny12) Value(258)
+
+EnumValue
+Enum(avr_mcu) String(attiny15) Value(259)
+
+EnumValue
+Enum(avr_mcu) String(attiny28) Value(260)
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 0f1d2c1647a..f9829904387 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -11525,22 +11525,22 @@ avr_init_builtins (void)
= build_function_type_list (node_##fx##k, ITYP (node_##fx##k), NULL)
tree node_hr = short_fract_type_node;
- tree node_r = fract_type_node;
+ tree node_nr = fract_type_node;
tree node_lr = long_fract_type_node;
tree node_llr = long_long_fract_type_node;
tree node_uhr = unsigned_short_fract_type_node;
- tree node_ur = unsigned_fract_type_node;
+ tree node_unr = unsigned_fract_type_node;
tree node_ulr = unsigned_long_fract_type_node;
tree node_ullr = unsigned_long_long_fract_type_node;
tree node_hk = short_accum_type_node;
- tree node_k = accum_type_node;
+ tree node_nk = accum_type_node;
tree node_lk = long_accum_type_node;
tree node_llk = long_long_accum_type_node;
tree node_uhk = unsigned_short_accum_type_node;
- tree node_uk = unsigned_accum_type_node;
+ tree node_unk = unsigned_accum_type_node;
tree node_ulk = unsigned_long_accum_type_node;
tree node_ullk = unsigned_long_long_accum_type_node;
@@ -11548,55 +11548,55 @@ avr_init_builtins (void)
/* For absfx builtins. */
FX_FTYPE_FX (h);
- FX_FTYPE_FX ();
+ FX_FTYPE_FX (n);
FX_FTYPE_FX (l);
FX_FTYPE_FX (ll);
/* For roundfx builtins. */
FX_FTYPE_FX_INT (h);
- FX_FTYPE_FX_INT ();
+ FX_FTYPE_FX_INT (n);
FX_FTYPE_FX_INT (l);
FX_FTYPE_FX_INT (ll);
FX_FTYPE_FX_INT (uh);
- FX_FTYPE_FX_INT (u);
+ FX_FTYPE_FX_INT (un);
FX_FTYPE_FX_INT (ul);
FX_FTYPE_FX_INT (ull);
/* For countlsfx builtins. */
INT_FTYPE_FX (h);
- INT_FTYPE_FX ();
+ INT_FTYPE_FX (n);
INT_FTYPE_FX (l);
INT_FTYPE_FX (ll);
INT_FTYPE_FX (uh);
- INT_FTYPE_FX (u);
+ INT_FTYPE_FX (un);
INT_FTYPE_FX (ul);
INT_FTYPE_FX (ull);
/* For bitsfx builtins. */
INTX_FTYPE_FX (h);
- INTX_FTYPE_FX ();
+ INTX_FTYPE_FX (n);
INTX_FTYPE_FX (l);
INTX_FTYPE_FX (ll);
INTX_FTYPE_FX (uh);
- INTX_FTYPE_FX (u);
+ INTX_FTYPE_FX (un);
INTX_FTYPE_FX (ul);
INTX_FTYPE_FX (ull);
/* For fxbits builtins. */
FX_FTYPE_INTX (h);
- FX_FTYPE_INTX ();
+ FX_FTYPE_INTX (n);
FX_FTYPE_INTX (l);
FX_FTYPE_INTX (ll);
FX_FTYPE_INTX (uh);
- FX_FTYPE_INTX (u);
+ FX_FTYPE_INTX (un);
FX_FTYPE_INTX (ul);
FX_FTYPE_INTX (ull);
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 7491f348a25..f223a6148ee 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -486,14 +486,16 @@ typedef struct avr_args
#define ADJUST_INSN_LENGTH(INSN, LENGTH) \
(LENGTH = avr_adjust_insn_length (INSN, LENGTH))
-extern const char *avr_device_to_arch (int argc, const char **argv);
+extern const char *avr_device_to_as (int argc, const char **argv);
+extern const char *avr_device_to_ld (int argc, const char **argv);
extern const char *avr_device_to_data_start (int argc, const char **argv);
extern const char *avr_device_to_startfiles (int argc, const char **argv);
extern const char *avr_device_to_devicelib (int argc, const char **argv);
extern const char *avr_device_to_sp8 (int argc, const char **argv);
#define EXTRA_SPEC_FUNCTIONS \
- { "device_to_arch", avr_device_to_arch }, \
+ { "device_to_as", avr_device_to_as }, \
+ { "device_to_ld", avr_device_to_ld }, \
{ "device_to_data_start", avr_device_to_data_start }, \
{ "device_to_startfile", avr_device_to_startfiles }, \
{ "device_to_devicelib", avr_device_to_devicelib }, \
@@ -507,14 +509,9 @@ extern const char *avr_device_to_sp8 (int argc, const char **argv);
#define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \
%{!fenforce-eh-specs:-fno-enforce-eh-specs} \
%{!fexceptions:-fno-exceptions}"
-/* A C string constant that tells the GCC driver program options to
- pass to `cc1plus'. */
-
-#define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;mmcu=avr35:-mmcu=avr3;mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;\
-mmcu=*:-mmcu=%*} \
-%{mmcu=*:%{!mmcu=avr2:%{!mmcu=at90s8515:%{!mmcu=avr31:%{!mmcu=atmega103:\
--mno-skip-bug}}}}}"
+#define ASM_SPEC "%:device_to_as(%{mmcu=*:%*}) "
+
#define LINK_SPEC "\
%{mrelax:--relax\
%{mpmem-wrap-around:%{mmcu=at90usb8*:--pmem-wrap-around=8k}\
@@ -524,7 +521,7 @@ mmcu=*:-mmcu=%*} \
%{mmcu=atmega64*|\
mmcu=at90can64*|\
mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
-%:device_to_arch(%{mmcu=*:%*})\
+%:device_to_ld(%{mmcu=*:%*})\
%:device_to_data_start(%{mmcu=*:%*})"
#define LIB_SPEC \
diff --git a/gcc/config/avr/builtins.def b/gcc/config/avr/builtins.def
index ce444abae74..3562c6932a6 100644
--- a/gcc/config/avr/builtins.def
+++ b/gcc/config/avr/builtins.def
@@ -62,78 +62,78 @@ DEF_BUILTIN (FLASH_SEGMENT, 1, char_ftype_const_memx_ptr, flash_segment, NULL)
/* 7.18a.6.2 The fixed-point absolute value functions. */
DEF_BUILTIN (ABSHR, 1, hr_ftype_hr, ssabsqq2, "__ssabs_1")
-DEF_BUILTIN (ABSR, 1, r_ftype_r, ssabshq2, "__ssabs_2")
+DEF_BUILTIN (ABSR, 1, nr_ftype_nr, ssabshq2, "__ssabs_2")
DEF_BUILTIN (ABSLR, 1, lr_ftype_lr, ssabssq2, "__ssabs_4")
DEF_BUILTIN (ABSLLR, -1, llr_ftype_llr, nothing, "__ssabsdq2") // GCC extension
DEF_BUILTIN (ABSHK, 1, hk_ftype_hk, ssabsha2, "__ssabs_2")
-DEF_BUILTIN (ABSK, 1, k_ftype_k, ssabssa2, "__ssabs_4")
+DEF_BUILTIN (ABSK, 1, nk_ftype_nk, ssabssa2, "__ssabs_4")
DEF_BUILTIN (ABSLK, -1, lk_ftype_lk, nothing, "__ssabsda2")
DEF_BUILTIN (ABSLLK, -1, llk_ftype_llk, nothing, "__ssabsta2") // GCC extension
/* 7.18a.6.3 The fixed-point round functions. */
DEF_BUILTIN (ROUNDHR, 2, hr_ftype_hr_int, roundqq3, "__roundhr")
-DEF_BUILTIN (ROUNDR, 2, r_ftype_r_int, roundhq3, "__roundr")
+DEF_BUILTIN (ROUNDR, 2, nr_ftype_nr_int, roundhq3, "__roundr")
DEF_BUILTIN (ROUNDLR, 2, lr_ftype_lr_int, roundsq3, "__roundlr")
DEF_BUILTIN (ROUNDLLR, -1, llr_ftype_llr_int, nothing, "__rounddq3") // GCC extension
DEF_BUILTIN (ROUNDUHR, 2, uhr_ftype_uhr_int, rounduqq3, "__rounduhr")
-DEF_BUILTIN (ROUNDUR, 2, ur_ftype_ur_int, rounduhq3, "__roundur")
+DEF_BUILTIN (ROUNDUR, 2, unr_ftype_unr_int, rounduhq3, "__roundur")
DEF_BUILTIN (ROUNDULR, 2, ulr_ftype_ulr_int, roundusq3, "__roundulr")
DEF_BUILTIN (ROUNDULLR, -1, ullr_ftype_ullr_int, nothing, "__roundudq3") // GCC extension
DEF_BUILTIN (ROUNDHK, 2, hk_ftype_hk_int, roundha3, "__roundhk")
-DEF_BUILTIN (ROUNDK, 2, k_ftype_k_int, roundsa3, "__roundk")
+DEF_BUILTIN (ROUNDK, 2, nk_ftype_nk_int, roundsa3, "__roundk")
DEF_BUILTIN (ROUNDLK, -1, lk_ftype_lk_int, nothing, "__roundda3")
DEF_BUILTIN (ROUNDLLK, -1, llk_ftype_llk_int, nothing, "__roundta3") // GCC extension
DEF_BUILTIN (ROUNDUHK, 2, uhk_ftype_uhk_int, rounduha3, "__rounduhk")
-DEF_BUILTIN (ROUNDUK, 2, uk_ftype_uk_int, roundusa3, "__rounduk")
+DEF_BUILTIN (ROUNDUK, 2, unk_ftype_unk_int, roundusa3, "__rounduk")
DEF_BUILTIN (ROUNDULK, -1, ulk_ftype_ulk_int, nothing, "__rounduda3")
DEF_BUILTIN (ROUNDULLK, -1, ullk_ftype_ullk_int, nothing, "__rounduta3") // GCC extension
/* 7.18a.6.4 The fixed-point bit countls functions. */
DEF_BUILTIN (COUNTLSHR, -1, int_ftype_hr, nothing, "__countlsqi2")
-DEF_BUILTIN (COUNTLSR, -1, int_ftype_r, nothing, "__countlshi2")
+DEF_BUILTIN (COUNTLSR, -1, int_ftype_nr, nothing, "__countlshi2")
DEF_BUILTIN (COUNTLSLR, -1, int_ftype_lr, nothing, "__countlssi2")
DEF_BUILTIN (COUNTLSLLR, -1, int_ftype_llr, nothing, "__countlsdi2") // GCC extension
DEF_BUILTIN (COUNTLSUHR, -1, int_ftype_uhr, nothing, "__countlsuqi2")
-DEF_BUILTIN (COUNTLSUR, -1, int_ftype_ur, nothing, "__countlsuhi2")
+DEF_BUILTIN (COUNTLSUR, -1, int_ftype_unr, nothing, "__countlsuhi2")
DEF_BUILTIN (COUNTLSULR, -1, int_ftype_ulr, nothing, "__countlsusi2")
DEF_BUILTIN (COUNTLSULLR, -1, int_ftype_ullr, nothing, "__countlsudi2") // GCC extension
DEF_BUILTIN (COUNTLSHK, -1, int_ftype_hk, nothing, "__countlshi2")
-DEF_BUILTIN (COUNTLSK, -1, int_ftype_k, nothing, "__countlssi2")
+DEF_BUILTIN (COUNTLSK, -1, int_ftype_nk, nothing, "__countlssi2")
DEF_BUILTIN (COUNTLSLK, -1, int_ftype_lk, nothing, "__countlsdi2")
DEF_BUILTIN (COUNTLSLLK, -1, int_ftype_llk, nothing, "__countlsdi2") // GCC extension
DEF_BUILTIN (COUNTLSUHK, -1, int_ftype_uhk, nothing, "__countlsuhi2")
-DEF_BUILTIN (COUNTLSUK, -1, int_ftype_uk, nothing, "__countlsusi2")
+DEF_BUILTIN (COUNTLSUK, -1, int_ftype_unk, nothing, "__countlsusi2")
DEF_BUILTIN (COUNTLSULK, -1, int_ftype_ulk, nothing, "__countlsudi2")
DEF_BUILTIN (COUNTLSULLK, -1, int_ftype_ullk, nothing, "__countlsudi2") // GCC extension
/* 7.18a.6.5 The bitwise fixed-point to integer conversion functions. */
DEF_BUILTIN (BITSHR, -1, inthr_ftype_hr, nothing, "__ret")
-DEF_BUILTIN (BITSR, -1, intr_ftype_r, nothing, "__ret")
+DEF_BUILTIN (BITSR, -1, intnr_ftype_nr, nothing, "__ret")
DEF_BUILTIN (BITSLR, -1, intlr_ftype_lr, nothing, "__ret")
DEF_BUILTIN (BITSLLR, -1, intllr_ftype_llr, nothing, "__ret") // GCC extension
DEF_BUILTIN (BITSUHR, -1, intuhr_ftype_uhr, nothing, "__ret")
-DEF_BUILTIN (BITSUR, -1, intur_ftype_ur, nothing, "__ret")
+DEF_BUILTIN (BITSUR, -1, intunr_ftype_unr, nothing, "__ret")
DEF_BUILTIN (BITSULR, -1, intulr_ftype_ulr, nothing, "__ret")
DEF_BUILTIN (BITSULLR, -1, intullr_ftype_ullr, nothing, "__ret") // GCC extension
DEF_BUILTIN (BITSHK, -1, inthk_ftype_hk, nothing, "__ret")
-DEF_BUILTIN (BITSK, -1, intk_ftype_k, nothing, "__ret")
+DEF_BUILTIN (BITSK, -1, intnk_ftype_nk, nothing, "__ret")
DEF_BUILTIN (BITSLK, -1, intlk_ftype_lk, nothing, "__ret")
DEF_BUILTIN (BITSLLK, -1, intllk_ftype_llk, nothing, "__ret") // GCC extension
DEF_BUILTIN (BITSUHK, -1, intuhk_ftype_uhk, nothing, "__ret")
-DEF_BUILTIN (BITSUK, -1, intuk_ftype_uk, nothing, "__ret")
+DEF_BUILTIN (BITSUK, -1, intunk_ftype_unk, nothing, "__ret")
DEF_BUILTIN (BITSULK, -1, intulk_ftype_ulk, nothing, "__ret")
DEF_BUILTIN (BITSULLK, -1, intullk_ftype_ullk, nothing, "__ret") // GCC extension
@@ -141,22 +141,22 @@ DEF_BUILTIN (BITSULLK, -1, intullk_ftype_ullk, nothing, "__ret") // GCC extensio
/* 7.18a.6.6 The bitwise integer to fixed-point conversion functions. */
DEF_BUILTIN ( HRBITS, -1, hr_ftype_inthr, nothing, "__ret")
-DEF_BUILTIN ( RBITS, -1, r_ftype_intr, nothing, "__ret")
+DEF_BUILTIN ( RBITS, -1, nr_ftype_intnr, nothing, "__ret")
DEF_BUILTIN ( LRBITS, -1, lr_ftype_intlr, nothing, "__ret")
DEF_BUILTIN ( LLRBITS, -1, llr_ftype_intllr, nothing, "__ret") // GCC extension
DEF_BUILTIN ( UHRBITS, -1, uhr_ftype_intuhr, nothing, "__ret")
-DEF_BUILTIN ( URBITS, -1, ur_ftype_intur, nothing, "__ret")
+DEF_BUILTIN ( URBITS, -1, unr_ftype_intunr, nothing, "__ret")
DEF_BUILTIN ( ULRBITS, -1, ulr_ftype_intulr, nothing, "__ret")
DEF_BUILTIN (ULLRBITS, -1, ullr_ftype_intullr, nothing, "__ret") // GCC extension
DEF_BUILTIN ( HKBITS, -1, hk_ftype_inthk, nothing, "__ret")
-DEF_BUILTIN ( KBITS, -1, k_ftype_intk, nothing, "__ret")
+DEF_BUILTIN ( KBITS, -1, nk_ftype_intnk, nothing, "__ret")
DEF_BUILTIN ( LKBITS, -1, lk_ftype_intlk, nothing, "__ret")
DEF_BUILTIN ( LLKBITS, -1, llk_ftype_intllk, nothing, "__ret") // GCC extension
DEF_BUILTIN ( UHKBITS, -1, uhk_ftype_intuhk, nothing, "__ret")
-DEF_BUILTIN ( UKBITS, -1, uk_ftype_intuk, nothing, "__ret")
+DEF_BUILTIN ( UKBITS, -1, unk_ftype_intunk, nothing, "__ret")
DEF_BUILTIN ( ULKBITS, -1, ulk_ftype_intulk, nothing, "__ret")
DEF_BUILTIN (ULLKBITS, -1, ullk_ftype_intullk, nothing, "__ret") // GCC extension
diff --git a/gcc/config/avr/driver-avr.c b/gcc/config/avr/driver-avr.c
index 47a04e507c5..e859f5f65a5 100644
--- a/gcc/config/avr/driver-avr.c
+++ b/gcc/config/avr/driver-avr.c
@@ -48,10 +48,25 @@ avr_set_current_device (const char *name)
avr_current_arch = &avr_arch_types[avr_current_device->arch];
}
-/* Returns command line parameters that describe the device architecture. */
+/* Returns command line parameters to pass to as. */
-const char *
-avr_device_to_arch (int argc, const char **argv)
+const char*
+avr_device_to_as (int argc, const char **argv)
+{
+ if (0 == argc)
+ return NULL;
+
+ avr_set_current_device (argv[0]);
+
+ return concat ("-mmcu=", avr_current_arch->arch_name,
+ avr_current_device->errata_skip ? "" : " -mno-skip-bug",
+ NULL);
+}
+
+/* Returns command line parameters to pass to ld. */
+
+const char*
+avr_device_to_ld (int argc, const char **argv)
{
if (0 == argc)
return NULL;
diff --git a/gcc/config/avr/t-multilib b/gcc/config/avr/t-multilib
index 68bc54cc5e9..6b1db609271 100644
--- a/gcc/config/avr/t-multilib
+++ b/gcc/config/avr/t-multilib
@@ -53,6 +53,7 @@ MULTILIB_MATCHES = \
mmcu?avr2=mmcu?at90c8534 \
mmcu?avr2=mmcu?at90s8535 \
mmcu?avr25=mmcu?ata6289 \
+ mmcu?avr25=mmcu?ata5272 \
mmcu?avr25=mmcu?attiny13 \
mmcu?avr25=mmcu?attiny13a \
mmcu?avr25=mmcu?attiny2313 \
@@ -82,16 +83,22 @@ MULTILIB_MATCHES = \
mmcu?avr3=mmcu?at76c711 \
mmcu?avr31=mmcu?atmega103 \
mmcu?avr31=mmcu?at43usb320 \
+ mmcu?avr35=mmcu?ata5505 \
mmcu?avr35=mmcu?at90usb82 \
mmcu?avr35=mmcu?at90usb162 \
mmcu?avr35=mmcu?atmega8u2 \
mmcu?avr35=mmcu?atmega16u2 \
mmcu?avr35=mmcu?atmega32u2 \
mmcu?avr35=mmcu?attiny167 \
+ mmcu?avr35=mmcu?attiny1634 \
+ mmcu?avr4=mmcu?ata6285 \
+ mmcu?avr4=mmcu?ata6286 \
mmcu?avr4=mmcu?atmega8 \
+ mmcu?avr4=mmcu?atmega8a \
mmcu?avr4=mmcu?atmega48 \
mmcu?avr4=mmcu?atmega48a \
mmcu?avr4=mmcu?atmega48p \
+ mmcu?avr4=mmcu?atmega48pa \
mmcu?avr4=mmcu?atmega88 \
mmcu?avr4=mmcu?atmega88a \
mmcu?avr4=mmcu?atmega88p \
@@ -105,6 +112,9 @@ MULTILIB_MATCHES = \
mmcu?avr4=mmcu?at90pwm3 \
mmcu?avr4=mmcu?at90pwm3b \
mmcu?avr4=mmcu?at90pwm81 \
+ mmcu?avr5=mmcu?ata5790 \
+ mmcu?avr5=mmcu?ata5790n \
+ mmcu?avr5=mmcu?ata5795 \
mmcu?avr5=mmcu?atmega16 \
mmcu?avr5=mmcu?atmega16a \
mmcu?avr5=mmcu?atmega161 \
@@ -112,17 +122,28 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?atmega163 \
mmcu?avr5=mmcu?atmega164a \
mmcu?avr5=mmcu?atmega164p \
+ mmcu?avr5=mmcu?atmega164pa \
mmcu?avr5=mmcu?atmega165 \
mmcu?avr5=mmcu?atmega165a \
mmcu?avr5=mmcu?atmega165p \
+ mmcu?avr5=mmcu?atmega165pa \
mmcu?avr5=mmcu?atmega168 \
mmcu?avr5=mmcu?atmega168a \
mmcu?avr5=mmcu?atmega168p \
+ mmcu?avr5=mmcu?atmega168pa \
mmcu?avr5=mmcu?atmega169 \
mmcu?avr5=mmcu?atmega169a \
mmcu?avr5=mmcu?atmega169p \
mmcu?avr5=mmcu?atmega169pa \
+ mmcu?avr5=mmcu?atmega16hva \
+ mmcu?avr5=mmcu?atmega16hvb \
+ mmcu?avr5=mmcu?atmega16hvbrevb \
+ mmcu?avr5=mmcu?atmega16m1 \
+ mmcu?avr5=mmcu?atmega16u4 \
+ mmcu?avr5=mmcu?atmega26hvg \
+ mmcu?avr5=mmcu?atmega32a \
mmcu?avr5=mmcu?atmega32 \
+ mmcu?avr5=mmcu?atmega32a \
mmcu?avr5=mmcu?atmega323 \
mmcu?avr5=mmcu?atmega324a \
mmcu?avr5=mmcu?atmega324p \
@@ -133,6 +154,7 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?atmega3250 \
mmcu?avr5=mmcu?atmega3250a \
mmcu?avr5=mmcu?atmega3250p \
+ mmcu?avr5=mmcu?atmega3250pa \
mmcu?avr5=mmcu?atmega328 \
mmcu?avr5=mmcu?atmega328p \
mmcu?avr5=mmcu?atmega329 \
@@ -142,8 +164,14 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?atmega3290 \
mmcu?avr5=mmcu?atmega3290a \
mmcu?avr5=mmcu?atmega3290p \
+ mmcu?avr5=mmcu?atmega3290pa \
+ mmcu?avr5=mmcu?atmega32c1 \
+ mmcu?avr5=mmcu?atmega32m1 \
+ mmcu?avr5=mmcu?atmega32u4 \
+ mmcu?avr5=mmcu?atmega32u6 \
mmcu?avr5=mmcu?atmega406 \
mmcu?avr5=mmcu?atmega64 \
+ mmcu?avr5=mmcu?atmega64a \
mmcu?avr5=mmcu?atmega640 \
mmcu?avr5=mmcu?atmega644 \
mmcu?avr5=mmcu?atmega644a \
@@ -163,9 +191,20 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?atmega16hva2 \
mmcu?avr5=mmcu?atmega16hvb \
mmcu?avr5=mmcu?atmega32hvb \
+ mmcu?avr5=mmcu?atmega6490a \
+ mmcu?avr5=mmcu?atmega6490p \
+ mmcu?avr5=mmcu?atmega64c1 \
+ mmcu?avr5=mmcu?atmega64m1 \
mmcu?avr5=mmcu?atmega64hve \
+ mmcu?avr5=mmcu?atmega64rfa2 \
+ mmcu?avr5=mmcu?atmega64rfr2 \
+ mmcu?avr5=mmcu?atmega32hvb \
+ mmcu?avr5=mmcu?atmega32hvbrevb \
+ mmcu?avr5=mmcu?atmega16hva2 \
+ mmcu?avr5=mmcu?atmega48hvf \
mmcu?avr5=mmcu?at90can32 \
mmcu?avr5=mmcu?at90can64 \
+ mmcu?avr5=mmcu?at90pwm161 \
mmcu?avr5=mmcu?at90pwm216 \
mmcu?avr5=mmcu?at90pwm316 \
mmcu?avr5=mmcu?atmega32c1 \
@@ -182,8 +221,10 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?at94k \
mmcu?avr5=mmcu?m3000 \
mmcu?avr51=mmcu?atmega128 \
+ mmcu?avr51=mmcu?atmega128a \
mmcu?avr51=mmcu?atmega1280 \
mmcu?avr51=mmcu?atmega1281 \
+ mmcu?avr51=mmcu?atmega1284 \
mmcu?avr51=mmcu?atmega1284p \
mmcu?avr51=mmcu?atmega128rfa1 \
mmcu?avr51=mmcu?at90can128 \
@@ -197,8 +238,23 @@ MULTILIB_MATCHES = \
mmcu?avrxmega2=mmcu?atxmega32a4 \
mmcu?avrxmega2=mmcu?atxmega32d4 \
mmcu?avrxmega2=mmcu?atxmega32x1 \
+ mmcu?avrxmega2=mmcu?atmxt112sl \
+ mmcu?avrxmega2=mmcu?atmxt224 \
+ mmcu?avrxmega2=mmcu?atmxt224e \
+ mmcu?avrxmega2=mmcu?atmxt336s \
+ mmcu?avrxmega2=mmcu?atxmega16a4u \
+ mmcu?avrxmega2=mmcu?atxmega16c4 \
+ mmcu?avrxmega2=mmcu?atxmega32a4u \
+ mmcu?avrxmega2=mmcu?atxmega32c4 \
+ mmcu?avrxmega2=mmcu?atxmega32e5 \
mmcu?avrxmega4=mmcu?atxmega64a3 \
mmcu?avrxmega4=mmcu?atxmega64d3 \
+ mmcu?avrxmega4=mmcu?atxmega64a3u \
+ mmcu?avrxmega4=mmcu?atxmega64a4u \
+ mmcu?avrxmega4=mmcu?atxmega64b1 \
+ mmcu?avrxmega4=mmcu?atxmega64b3 \
+ mmcu?avrxmega4=mmcu?atxmega64c3 \
+ mmcu?avrxmega4=mmcu?atxmega64d4 \
mmcu?avrxmega5=mmcu?atxmega64a1 \
mmcu?avrxmega5=mmcu?atxmega64a1u \
mmcu?avrxmega6=mmcu?atxmega128a3 \
@@ -209,5 +265,19 @@ MULTILIB_MATCHES = \
mmcu?avrxmega6=mmcu?atxmega256a3b \
mmcu?avrxmega6=mmcu?atxmega256a3bu \
mmcu?avrxmega6=mmcu?atxmega256d3 \
+ mmcu?avrxmega6=mmcu?atxmega128a3u \
+ mmcu?avrxmega6=mmcu?atxmega128b1 \
+ mmcu?avrxmega6=mmcu?atxmega128b3 \
+ mmcu?avrxmega6=mmcu?atxmega128c3 \
+ mmcu?avrxmega6=mmcu?atxmega128d4 \
+ mmcu?avrxmega6=mmcu?atmxt540s \
+ mmcu?avrxmega6=mmcu?atmxt540sreva \
+ mmcu?avrxmega6=mmcu?atxmega192a3u \
+ mmcu?avrxmega6=mmcu?atxmega192c3 \
+ mmcu?avrxmega6=mmcu?atxmega256a3u \
+ mmcu?avrxmega6=mmcu?atxmega256c3 \
+ mmcu?avrxmega6=mmcu?atxmega384c3 \
+ mmcu?avrxmega6=mmcu?atxmega384d3 \
mmcu?avrxmega7=mmcu?atxmega128a1 \
- mmcu?avrxmega7=mmcu?atxmega128a1u
+ mmcu?avrxmega7=mmcu?atxmega128a1u \
+ mmcu?avrxmega7=mmcu?atxmega128a4u
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 28b9d337d96..e0db8b12a27 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -183,7 +183,7 @@ typedef int unit_req_table[2][UNIT_REQ_MAX];
static unit_req_table unit_reqs;
/* Register map for debugging. */
-int const dbx_register_map[FIRST_PSEUDO_REGISTER] =
+unsigned const dbx_register_map[FIRST_PSEUDO_REGISTER] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* A0 - A15. */
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, /* A16 - A32. */
diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h
index 434db2596cb..ce331cbe363 100644
--- a/gcc/config/c6x/c6x.h
+++ b/gcc/config/c6x/c6x.h
@@ -521,7 +521,7 @@ struct GTY(()) machine_function
#define DBX_REGISTER_NUMBER(N) (dbx_register_map[(N)])
-extern int const dbx_register_map[FIRST_PSEUDO_REGISTER];
+extern unsigned const dbx_register_map[FIRST_PSEUDO_REGISTER];
#define FINAL_PRESCAN_INSN c6x_final_prescan_insn
diff --git a/gcc/config/cr16/cr16-protos.h b/gcc/config/cr16/cr16-protos.h
index 63040ce8c8c..a5213158dec 100644
--- a/gcc/config/cr16/cr16-protos.h
+++ b/gcc/config/cr16/cr16-protos.h
@@ -83,8 +83,6 @@ extern int cr16_const_double_ok (rtx op);
extern int legitimate_pic_operand_p (rtx);
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
-#endif /* RTX_CODE. */
-
/* Prologue/Epilogue functions. */
extern int cr16_initial_elimination_offset (int, int);
@@ -94,6 +92,8 @@ extern void cr16_expand_epilogue (void);
extern const char *cr16_emit_add_sub_di (rtx *, enum rtx_code);
extern const char *cr16_emit_logical_di (rtx *, enum rtx_code);
+#endif /* RTX_CODE. */
+
/* Handling the "interrupt" attribute. */
extern int cr16_interrupt_function_p (void);
extern bool cr16_is_data_model (enum data_model_type);
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 30e13d128d1..6483a03e57d 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -168,9 +168,6 @@ gen_int_relational (enum rtx_code code,
{
enum machine_mode mode;
int branch_p;
- rtx temp;
- rtx cond;
- rtx label;
mode = GET_MODE (cmp0);
if (mode == VOIDmode)
diff --git a/gcc/config/lm32/lm32.md b/gcc/config/lm32/lm32.md
index f7b47034391..77ef46e3bf6 100644
--- a/gcc/config/lm32/lm32.md
+++ b/gcc/config/lm32/lm32.md
@@ -824,7 +824,6 @@
{
int i;
int shifts = INTVAL (operands[2]);
- rtx one = GEN_INT (1);
if (shifts == 0)
emit_move_insn (operands[0], operands[1]);
diff --git a/gcc/config/mep/t-mep b/gcc/config/mep/t-mep
index 7e0321c98c7..b877b950dea 100644
--- a/gcc/config/mep/t-mep
+++ b/gcc/config/mep/t-mep
@@ -29,7 +29,7 @@ mep-pragma.o: $(srcdir)/config/mep/mep-pragma.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(C_PRAGMA_H) \
$(CPPLIB_H) hard-reg-set.h output.h $(srcdir)/config/mep/mep-protos.h \
function.h insn-config.h reload.h $(TARGET_H)
- $(COMPILER) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
MULTILIB_OPTIONS = mel mall-opts mfar
MULTILIB_DIRNAMES = el allopt far
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index fc0296e2c15..f45d30cf450 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -2842,21 +2842,8 @@ microblaze_emit_compare (enum machine_mode mode, rtx cmp, enum rtx_code *cmp_cod
if (code == EQ || code == NE)
{
- if (TARGET_PATTERN_COMPARE && GET_CODE(cmp_op1) == REG)
- {
- if (code == EQ)
- {
- emit_insn (gen_seq_internal_pat (comp_reg, cmp_op0, cmp_op1));
- *cmp_code = NE;
- }
- else
- {
- emit_insn (gen_sne_internal_pat (comp_reg, cmp_op0, cmp_op1));
- }
- }
- else
- /* Use xor for equal/not-equal comparison. */
- emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1));
+ /* Use xor for equal/not-equal comparison. */
+ emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1));
}
else if (code == GT || code == GTU || code == LE || code == LEU)
{
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 1b4200307cb..339186455ba 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -1637,10 +1637,10 @@
;; Setting a register from an floating point comparison.
;;----------------------------------------------------------------
(define_insn "cstoresf4"
- [(set (match_operand:SI 0 "register_operand")
- (match_operator:SI 1 "ordered_comparison_operator"
- [(match_operand:SF 2 "register_operand")
- (match_operand:SF 3 "register_operand")]))]
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (match_operator 1 "comparison_operator"
+ [(match_operand:SF 2 "register_operand" "r")
+ (match_operand:SF 3 "register_operand" "r")]))]
"TARGET_HARD_FLOAT"
"fcmp.%C1\t%0,%3,%2"
[(set_attr "type" "fcmp")
@@ -1667,7 +1667,7 @@
(define_expand "cbranchsf4"
[(set (pc)
- (if_then_else (match_operator:SI 0 "ordered_comparison_operator"
+ (if_then_else (match_operator 0 "comparison_operator"
[(match_operand:SF 1 "register_operand")
(match_operand:SF 2 "register_operand")])
(label_ref (match_operand 3 ""))
diff --git a/gcc/config/mips/micromips.md b/gcc/config/mips/micromips.md
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/config/mips/micromips.md
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 32b224fd687..f490e2d8e21 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1077,7 +1077,7 @@ mn10300_expand_epilogue (void)
/* Insn: add size + 4 * num_regs_to_save
+ reg_save_bytes - 252,sp. */
this_strategy_size = SIZE_ADD_SP (size + 4 * num_regs_to_save
- + reg_save_bytes - 252);
+ + (int) reg_save_bytes - 252);
/* Insn: fmov (##,sp),fs#, fo each fs# to be restored. */
this_strategy_size += SIZE_FMOV_SP (252 - reg_save_bytes
- 4 * num_regs_to_save,
@@ -3225,7 +3225,6 @@ mn10300_loop_contains_call_insn (loop_p loop)
static void
mn10300_scan_for_setlb_lcc (void)
{
- struct loops loops;
loop_iterator liter;
loop_p loop;
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index ef01a0a59de..98f53f1993e 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -3952,8 +3952,6 @@ tilegx_expand_prologue (void)
address. */
rtx chain_addr = gen_rtx_REG (Pmode, next_scratch_regno--);
rtx size_rtx = GEN_INT (-(total_size - UNITS_PER_WORD));
- int cfa_offset =
- frame_pointer_needed ? UNITS_PER_WORD - total_size : UNITS_PER_WORD;
if (add_operand (size_rtx, Pmode))
{
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index c7b299b7c37..29dff87f078 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -3573,8 +3573,6 @@ tilepro_expand_prologue (void)
address. */
rtx chain_addr = gen_rtx_REG (Pmode, next_scratch_regno--);
rtx size_rtx = gen_int_si (-(total_size - UNITS_PER_WORD));
- int cfa_offset =
- frame_pointer_needed ? UNITS_PER_WORD - total_size : UNITS_PER_WORD;
if (add_operand (size_rtx, Pmode))
{
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4a2baa00ad5..eb030f117e2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,53 @@
+2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (grokdeclarator): Remove dead code.
+
+2013-02-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/56481
+ * semantics.c (potential_constant_expression_1): Use
+ cxx_eval_outermost_constant_expr rather than maybe_constant_value.
+
+ PR c++/56243
+ * call.c (build_over_call): Avoid virtual lookup in a template.
+
+2013-02-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/56358
+ PR c++/56323
+ * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
+ of the base name for inheriting ctors.
+ (push_class_level_binding_1): Remove inheriting ctor handling.
+ * pt.c (tsubst_decl) [USING_DECL]: Likewise.
+ * class.c (add_implicitly_declared_members): Adjust.
+
+2013-02-26 David Binderman <dcb314@hotmail.com>
+
+ PR c++/55632
+ * decl.c (grokdeclarator): Tidy publicp assignment.
+
+2013-02-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR c++/56419
+ * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
+ (build_transaction_expr): Same.
+
+2013-02-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/56377
+ * pt.c (fn_type_unification): Wait to call push_tinst_level until
+ we know what args we're looking at.
+
+ PR c++/56438
+ * semantics.c (potential_constant_expression_1): In C++98, a cast
+ to non-integral type can't be a constant expression.
+
+2013-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56403
+ * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
+ of CLASS_TYPE_P.
+
2013-02-22 Jason Merrill <jason@redhat.com>
PR c++/40405
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7c414217f05..4eb38ec73e9 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7033,7 +7033,10 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
if (!already_used)
mark_used (fn);
- if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0)
+ if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
+ /* Don't mess with virtual lookup in fold_non_dependent_expr; virtual
+ functions can't be constexpr. */
+ && !in_template_function ())
{
tree t;
tree binfo = lookup_base (TREE_TYPE (TREE_TYPE (argarray[0])),
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index eaa109acce3..2a0351f7c83 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3010,11 +3010,10 @@ add_implicitly_declared_members (tree t, tree* access_decls,
{
tree using_decl = TREE_VALUE (*access_decls);
tree decl = USING_DECL_DECLS (using_decl);
- if (DECL_SELF_REFERENCE_P (decl))
+ if (DECL_NAME (using_decl) == ctor_identifier)
{
/* declare, then remove the decl */
- tree ctor_list = lookup_fnfields_slot (TREE_TYPE (decl),
- ctor_identifier);
+ tree ctor_list = decl;
location_t loc = input_location;
input_location = DECL_SOURCE_LOCATION (using_decl);
if (ctor_list)
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d8d3344fa5e..80c437a522c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8608,7 +8608,6 @@ grokdeclarator (const cp_declarator *declarator,
int explicit_int = 0;
int explicit_char = 0;
int defaulted_int = 0;
- tree dependent_name = NULL_TREE;
tree typedef_decl = NULL_TREE;
const char *name = NULL;
@@ -9205,12 +9204,6 @@ grokdeclarator (const cp_declarator *declarator,
}
friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend);
- if (dependent_name && !friendp)
- {
- error ("%<%T::%D%> is not a valid declarator", ctype, dependent_name);
- return error_mark_node;
- }
-
/* Issue errors about use of storage classes for parameters. */
if (decl_context == PARM)
{
@@ -10643,9 +10636,8 @@ grokdeclarator (const cp_declarator *declarator,
}
}
- /* Record presence of `static'. */
+ /* Record whether the function is public. */
publicp = (ctype != NULL_TREE
- || storage_class == sc_extern
|| storage_class != sc_static);
decl = grokfndecl (ctype, type, original_name, parms, unqualified_id,
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 6f46404760e..697f11ff52e 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -179,7 +179,7 @@ build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
init = convert (type, nullptr_node);
else if (SCALAR_TYPE_P (type))
init = convert (type, integer_zero_node);
- else if (CLASS_TYPE_P (type))
+ else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))
{
tree field;
vec<constructor_elt, va_gc> *v = NULL;
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 1f3c042041e..2a47331ea73 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3027,13 +3027,6 @@ push_class_level_binding_1 (tree name, tree x)
&& TREE_TYPE (decl) == error_mark_node)
decl = TREE_VALUE (decl);
- if (TREE_CODE (decl) == USING_DECL
- && TYPE_NAME (USING_DECL_SCOPE (decl))
- && DECL_NAME (decl) == TYPE_IDENTIFIER (USING_DECL_SCOPE (decl)))
- /* This using-declaration declares inheriting constructors; it does not
- redeclare the name of a template parameter. */
- return true;
-
if (!check_template_shadow (decl))
return false;
@@ -3225,12 +3218,14 @@ do_class_using_decl (tree scope, tree name)
error ("%<%T::%D%> names destructor", scope, name);
return NULL_TREE;
}
- if (TYPE_NAME (scope) && name == TYPE_IDENTIFIER (scope))
- /* 3.4.3.1 says that using B::B always names the constructor even if B
- is a typedef; now replace the second B with the real name. */
- name = TYPE_IDENTIFIER (TYPE_MAIN_VARIANT (scope));
- if (MAYBE_CLASS_TYPE_P (scope) && constructor_name_p (name, scope))
- maybe_warn_cpp0x (CPP0X_INHERITING_CTORS);
+ /* Using T::T declares inheriting ctors, even if T is a typedef. */
+ if (MAYBE_CLASS_TYPE_P (scope)
+ && ((TYPE_NAME (scope) && name == TYPE_IDENTIFIER (scope))
+ || constructor_name_p (name, scope)))
+ {
+ maybe_warn_cpp0x (CPP0X_INHERITING_CTORS);
+ name = ctor_identifier;
+ }
if (constructor_name_p (name, current_class_type))
{
error ("%<%T::%D%> names constructor in %qT",
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5ff08211ebc..eb9fc7f94c7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10490,14 +10490,9 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
if (DECL_DEPENDENT_P (t)
|| uses_template_parms (USING_DECL_SCOPE (t)))
{
- tree scope = USING_DECL_SCOPE (t);
tree inst_scope = tsubst_copy (USING_DECL_SCOPE (t), args,
complain, in_decl);
tree name = tsubst_copy (DECL_NAME (t), args, complain, in_decl);
- /* Handle 'using T::T'. */
- if (TYPE_NAME (scope)
- && name == TYPE_IDENTIFIER (scope))
- name = TYPE_IDENTIFIER (inst_scope);
r = do_class_using_decl (inst_scope, name);
if (!r)
r = error_mark_node;
@@ -14900,19 +14895,6 @@ fn_type_unification (tree fn,
tree tinst;
tree r = error_mark_node;
- /* Adjust any explicit template arguments before entering the
- substitution context. */
- if (explicit_targs)
- {
- explicit_targs
- = (coerce_template_parms (tparms, explicit_targs, NULL_TREE,
- complain,
- /*require_all_args=*/false,
- /*use_default_args=*/false));
- if (explicit_targs == error_mark_node)
- return error_mark_node;
- }
-
/* In C++0x, it's possible to have a function template whose type depends
on itself recursively. This is most obvious with decltype, but can also
occur with enumeration scope (c++/48969). So we need to catch infinite
@@ -14926,13 +14908,7 @@ fn_type_unification (tree fn,
This is, of course, not reentrant. */
if (excessive_deduction_depth)
return error_mark_node;
- tinst = build_tree_list (fn, targs);
- if (!push_tinst_level (tinst))
- {
- excessive_deduction_depth = true;
- ggc_free (tinst);
- return error_mark_node;
- }
+ tinst = build_tree_list (fn, NULL_TREE);
++deduction_depth;
push_deferring_access_checks (dk_deferred);
@@ -14962,6 +14938,16 @@ fn_type_unification (tree fn,
location_t loc = input_location;
bool incomplete = false;
+ /* Adjust any explicit template arguments before entering the
+ substitution context. */
+ explicit_targs
+ = (coerce_template_parms (tparms, explicit_targs, NULL_TREE,
+ complain,
+ /*require_all_args=*/false,
+ /*use_default_args=*/false));
+ if (explicit_targs == error_mark_node)
+ goto fail;
+
/* Substitute the explicit args into the function type. This is
necessary so that, for instance, explicitly declared function
arguments can match null pointed constants. If we were given
@@ -15008,14 +14994,19 @@ fn_type_unification (tree fn,
}
}
+ TREE_VALUE (tinst) = explicit_targs;
+ if (!push_tinst_level (tinst))
+ {
+ excessive_deduction_depth = true;
+ goto fail;
+ }
processing_template_decl += incomplete;
input_location = DECL_SOURCE_LOCATION (fn);
- TREE_VALUE (tinst) = explicit_targs;
fntype = tsubst (TREE_TYPE (fn), explicit_targs,
complain | tf_partial, NULL_TREE);
- TREE_VALUE (tinst) = targs;
input_location = loc;
processing_template_decl -= incomplete;
+ pop_tinst_level ();
if (fntype == error_mark_node)
goto fail;
@@ -15051,11 +15042,9 @@ fn_type_unification (tree fn,
callers must be ready to deal with unification failures in any
event. */
- pop_tinst_level ();
ok = !type_unification_real (DECL_INNERMOST_TEMPLATE_PARMS (fn),
targs, parms, args, nargs, /*subr=*/0,
strict, flags, explain_p);
- push_tinst_level (tinst);
if (!ok)
goto fail;
@@ -15096,7 +15085,15 @@ fn_type_unification (tree fn,
the corresponding deduced argument values. If the
substitution results in an invalid type, as described above,
type deduction fails. */
+ TREE_VALUE (tinst) = targs;
+ if (!push_tinst_level (tinst))
+ {
+ excessive_deduction_depth = true;
+ goto fail;
+ }
decl = instantiate_template (fn, targs, complain);
+ pop_tinst_level ();
+
if (decl == error_mark_node)
goto fail;
@@ -15141,7 +15138,6 @@ fn_type_unification (tree fn,
excessive_deduction_depth = false;
}
- pop_tinst_level ();
/* We can't free this if a pending_template entry or last_error_tinst_level
is pointing at it. */
if (last_pending_template == old_last_pend
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 458ed26d330..8038aa26e48 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5108,6 +5108,7 @@ begin_transaction_stmt (location_t loc, tree *pcompound, int flags)
"transactional memory support enabled")));
TRANSACTION_EXPR_BODY (r) = push_stmt_list ();
+ TREE_SIDE_EFFECTS (r) = 1;
return r;
}
@@ -5157,6 +5158,7 @@ build_transaction_expr (location_t loc, tree expr, int flags, tree noex)
ret = build1 (TRANSACTION_EXPR, TREE_TYPE (expr), expr);
if (flags & TM_STMT_ATTR_RELAXED)
TRANSACTION_EXPR_RELAXED (ret) = 1;
+ TREE_SIDE_EFFECTS (ret) = 1;
SET_EXPR_LOCATION (ret, loc);
return ret;
}
@@ -8607,6 +8609,18 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case STATIC_CAST_EXPR:
case REINTERPRET_CAST_EXPR:
case IMPLICIT_CONV_EXPR:
+ if (cxx_dialect < cxx0x
+ && !dependent_type_p (TREE_TYPE (t))
+ && !INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (t)))
+ /* In C++98, a conversion to non-integral type can't be part of a
+ constant expression. */
+ {
+ if (flags & tf_error)
+ error ("cast to non-integral type %qT in a constant expression",
+ TREE_TYPE (t));
+ return false;
+ }
+
return (potential_constant_expression_1
(TREE_OPERAND (t, 0),
TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE, flags));
@@ -8669,10 +8683,12 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case ROUND_MOD_EXPR:
{
tree denom = TREE_OPERAND (t, 1);
- /* We can't call maybe_constant_value on an expression
+ if (!potential_constant_expression_1 (denom, rval, flags))
+ return false;
+ /* We can't call cxx_eval_outermost_constant_expr on an expression
that hasn't been through fold_non_dependent_expr yet. */
if (!processing_template_decl)
- denom = maybe_constant_value (denom);
+ denom = cxx_eval_outermost_constant_expr (denom, true);
if (integer_zerop (denom))
{
if (flags & tf_error)
@@ -8682,7 +8698,8 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
else
{
want_rval = true;
- goto binary;
+ return potential_constant_expression_1 (TREE_OPERAND (t, 0),
+ want_rval, flags);
}
}
@@ -8717,7 +8734,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
if (!potential_constant_expression_1 (op, rval, flags))
return false;
if (!processing_template_decl)
- op = maybe_constant_value (op);
+ op = cxx_eval_outermost_constant_expr (op, true);
if (tree_int_cst_equal (op, tmp))
return potential_constant_expression_1 (TREE_OPERAND (t, 1), rval, flags);
else
@@ -8779,7 +8796,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
if (!potential_constant_expression_1 (tmp, rval, flags))
return false;
if (!processing_template_decl)
- tmp = maybe_constant_value (tmp);
+ tmp = cxx_eval_outermost_constant_expr (tmp, true);
if (integer_zerop (tmp))
return potential_constant_expression_1 (TREE_OPERAND (t, 2),
want_rval, flags);
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 2928776dfcf..931fa2c7e48 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -1153,6 +1153,7 @@ df_insn_delete (basic_block bb, unsigned int uid)
df_ref_chain_delete (insn_info->defs);
df_ref_chain_delete (insn_info->uses);
df_ref_chain_delete (insn_info->eq_uses);
+ df_scan_free_mws_vec (insn_info->mw_hardregs);
}
pool_free (problem_data->insn_pool, insn_info);
DF_INSN_UID_SET (uid, NULL);
@@ -1332,6 +1333,7 @@ df_insn_rescan_debug_internal (rtx insn)
df_ref_chain_delete (insn_info->defs);
df_ref_chain_delete (insn_info->uses);
df_ref_chain_delete (insn_info->eq_uses);
+ df_scan_free_mws_vec (insn_info->mw_hardregs);
insn_info->defs = df_null_ref_rec;
insn_info->uses = df_null_ref_rec;
diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi
index 85d6fc993f6..b1313c45e9e 100644
--- a/gcc/doc/avr-mmcu.texi
+++ b/gcc/doc/avr-mmcu.texi
@@ -18,7 +18,7 @@
@item avr25
``Classic'' devices with up to 8@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{ata6289}, @code{attiny13}, @code{attiny13a}, @code{attiny2313}, @code{attiny2313a}, @code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261}, @code{attiny261a}, @code{attiny43u}, @code{attiny4313}, @code{attiny44}, @code{attiny44a}, @code{attiny45}, @code{attiny461}, @code{attiny461a}, @code{attiny48}, @code{attiny84}, @code{attiny84a}, @code{attiny85}, @code{attiny861}, @code{attiny861a}, @code{attiny87}, @code{attiny88}, @code{at86rf401}.
+@*@var{mcu}@tie{}= @code{ata5272}, @code{ata6289}, @code{attiny13}, @code{attiny13a}, @code{attiny2313}, @code{attiny2313a}, @code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261}, @code{attiny261a}, @code{attiny43u}, @code{attiny4313}, @code{attiny44}, @code{attiny44a}, @code{attiny45}, @code{attiny461}, @code{attiny461a}, @code{attiny48}, @code{attiny84}, @code{attiny84a}, @code{attiny85}, @code{attiny861}, @code{attiny861a}, @code{attiny87}, @code{attiny88}, @code{at86rf401}.
@item avr3
``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
@@ -30,19 +30,19 @@
@item avr35
``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{atmega16u2}, @code{atmega32u2}, @code{atmega8u2}, @code{attiny167}, @code{at90usb162}, @code{at90usb82}.
+@*@var{mcu}@tie{}= @code{ata5505}, @code{atmega16u2}, @code{atmega32u2}, @code{atmega8u2}, @code{attiny1634}, @code{attiny167}, @code{at90usb162}, @code{at90usb82}.
@item avr4
``Enhanced'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega48}, @code{atmega48a}, @code{atmega48p}, @code{atmega8}, @code{atmega8hva}, @code{atmega8515}, @code{atmega8535}, @code{atmega88}, @code{atmega88a}, @code{atmega88p}, @code{atmega88pa}, @code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b}, @code{at90pwm3}, @code{at90pwm3b}, @code{at90pwm81}.
+@*@var{mcu}@tie{}= @code{ata6285}, @code{ata6286}, @code{atmega48}, @code{atmega48a}, @code{atmega48p}, @code{atmega48pa}, @code{atmega8}, @code{atmega8a}, @code{atmega8hva}, @code{atmega8515}, @code{atmega8535}, @code{atmega88}, @code{atmega88a}, @code{atmega88p}, @code{atmega88pa}, @code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b}, @code{at90pwm3}, @code{at90pwm3b}, @code{at90pwm81}.
@item avr5
``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega16}, @code{atmega16a}, @code{atmega16hva}, @code{atmega16hva2}, @code{atmega16hvb}, @code{atmega16m1}, @code{atmega16u4}, @code{atmega161}, @code{atmega162}, @code{atmega163}, @code{atmega164a}, @code{atmega164p}, @code{atmega165}, @code{atmega165a}, @code{atmega165p}, @code{atmega168}, @code{atmega168a}, @code{atmega168p}, @code{atmega169}, @code{atmega169a}, @code{atmega169p}, @code{atmega169pa}, @code{atmega32}, @code{atmega32c1}, @code{atmega32hvb}, @code{atmega32m1}, @code{atmega32u4}, @code{atmega32u6}, @code{atmega323}, @code{atmega324a}, @code{atmega324p}, @code{atmega324pa}, @code{atmega325}, @code{atmega325a}, @code{atmega325p}, @code{atmega3250}, @code{atmega3250a}, @code{atmega3250p}, @code{atmega328}, @code{atmega328p}, @code{atmega329}, @code{atmega329a}, @code{atmega329p}, @code{atmega329pa}, @code{atmega3290}, @code{atmega3290a}, @code{atmega3290p}, @code{atmega406}, @code{atmega64}, @code{atmega64c1}, @code{atmega64hve}, @code{atmega64m1}, @code{atmega640}, @code{atmega644}, @code{atmega644a}, @code{atmega644p}, @code{atmega644pa}, @code{atmega645}, @code{atmega645a}, @code{atmega645p}, @code{atmega6450}, @code{atmega6450a}, @code{atmega6450p}, @code{atmega649}, @code{atmega649a}, @code{atmega649p}, @code{atmega6490}, @code{at90can32}, @code{at90can64}, @code{at90pwm216}, @code{at90pwm316}, @code{at90scr100}, @code{at90usb646}, @code{at90usb647}, @code{at94k}, @code{m3000}.
+@*@var{mcu}@tie{}= @code{ata5790}, @code{ata5790n}, @code{ata5795}, @code{atmega16}, @code{atmega16a}, @code{atmega16hva}, @code{atmega16hva}, @code{atmega16hva2}, @code{atmega16hva2}, @code{atmega16hvb}, @code{atmega16hvb}, @code{atmega16hvbrevb}, @code{atmega16m1}, @code{atmega16m1}, @code{atmega16u4}, @code{atmega16u4}, @code{atmega161}, @code{atmega162}, @code{atmega163}, @code{atmega164a}, @code{atmega164p}, @code{atmega164pa}, @code{atmega165}, @code{atmega165a}, @code{atmega165p}, @code{atmega165pa}, @code{atmega168}, @code{atmega168a}, @code{atmega168p}, @code{atmega168pa}, @code{atmega169}, @code{atmega169a}, @code{atmega169p}, @code{atmega169pa}, @code{atmega26hvg}, @code{atmega32}, @code{atmega32a}, @code{atmega32a}, @code{atmega32c1}, @code{atmega32c1}, @code{atmega32hvb}, @code{atmega32hvb}, @code{atmega32hvbrevb}, @code{atmega32m1}, @code{atmega32m1}, @code{atmega32u4}, @code{atmega32u4}, @code{atmega32u6}, @code{atmega32u6}, @code{atmega323}, @code{atmega324a}, @code{atmega324p}, @code{atmega324pa}, @code{atmega325}, @code{atmega325a}, @code{atmega325p}, @code{atmega3250}, @code{atmega3250a}, @code{atmega3250p}, @code{atmega3250pa}, @code{atmega328}, @code{atmega328p}, @code{atmega329}, @code{atmega329a}, @code{atmega329p}, @code{atmega329pa}, @code{atmega3290}, @code{atmega3290a}, @code{atmega3290p}, @code{atmega3290pa}, @code{atmega406}, @code{atmega48hvf}, @code{atmega64}, @code{atmega64a}, @code{atmega64c1}, @code{atmega64c1}, @code{atmega64hve}, @code{atmega64m1}, @code{atmega64m1}, @code{atmega64rfa2}, @code{atmega64rfr2}, @code{atmega640}, @code{atmega644}, @code{atmega644a}, @code{atmega644p}, @code{atmega644pa}, @code{atmega645}, @code{atmega645a}, @code{atmega645p}, @code{atmega6450}, @code{atmega6450a}, @code{atmega6450p}, @code{atmega649}, @code{atmega649a}, @code{atmega649p}, @code{atmega6490}, @code{atmega6490a}, @code{atmega6490p}, @code{at90can32}, @code{at90can64}, @code{at90pwm161}, @code{at90pwm216}, @code{at90pwm316}, @code{at90scr100}, @code{at90usb646}, @code{at90usb647}, @code{at94k}, @code{m3000}.
@item avr51
``Enhanced'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega128}, @code{atmega128rfa1}, @code{atmega1280}, @code{atmega1281}, @code{atmega1284p}, @code{at90can128}, @code{at90usb1286}, @code{at90usb1287}.
+@*@var{mcu}@tie{}= @code{atmega128}, @code{atmega128a}, @code{atmega128rfa1}, @code{atmega1280}, @code{atmega1281}, @code{atmega1284}, @code{atmega1284p}, @code{at90can128}, @code{at90usb1286}, @code{at90usb1287}.
@item avr6
``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB of program memory.
@@ -50,11 +50,11 @@
@item avrxmega2
``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega16a4}, @code{atxmega16d4}, @code{atxmega16x1}, @code{atxmega32a4}, @code{atxmega32d4}, @code{atxmega32x1}.
+@*@var{mcu}@tie{}= @code{atmxt112sl}, @code{atmxt224}, @code{atmxt224e}, @code{atmxt336s}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16x1}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c4}, @code{atxmega32d4}, @code{atxmega32e5}, @code{atxmega32x1}.
@item avrxmega4
``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64d3}.
+@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64a3u}, @code{atxmega64a4u}, @code{atxmega64b1}, @code{atxmega64b3}, @code{atxmega64c3}, @code{atxmega64d3}, @code{atxmega64d4}.
@item avrxmega5
``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
@@ -62,11 +62,11 @@
@item avrxmega6
``XMEGA'' devices with more than 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega128a3}, @code{atxmega128d3}, @code{atxmega192a3}, @code{atxmega192d3}, @code{atxmega256a3}, @code{atxmega256a3b}, @code{atxmega256a3bu}, @code{atxmega256d3}.
+@*@var{mcu}@tie{}= @code{atmxt540s}, @code{atmxt540sreva}, @code{atxmega128a3}, @code{atxmega128a3u}, @code{atxmega128b1}, @code{atxmega128b3}, @code{atxmega128c3}, @code{atxmega128d3}, @code{atxmega128d4}, @code{atxmega192a3}, @code{atxmega192a3u}, @code{atxmega192c3}, @code{atxmega192d3}, @code{atxmega256a3}, @code{atxmega256a3b}, @code{atxmega256a3bu}, @code{atxmega256a3u}, @code{atxmega256c3}, @code{atxmega256d3}, @code{atxmega384c3}, @code{atxmega384d3}.
@item avrxmega7
``XMEGA'' devices with more than 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-@*@var{mcu}@tie{}= @code{atxmega128a1}, @code{atxmega128a1u}.
+@*@var{mcu}@tie{}= @code{atxmega128a1}, @code{atxmega128a1u}, @code{atxmega128a4u}.
@item avr1
This ISA is implemented by the minimal AVR core and supported for assembler only.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index eb84408ce7c..ca655153067 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -30,8 +30,8 @@ extensions, accepted by GCC in C90 mode and in C++.
* Constructing Calls:: Dispatching a call to another function.
* Typeof:: @code{typeof}: referring to the type of an expression.
* Conditionals:: Omitting the middle operand of a @samp{?:} expression.
-* Long Long:: Double-word integers---@code{long long int}.
* __int128:: 128-bit integers---@code{__int128}.
+* Long Long:: Double-word integers---@code{long long int}.
* Complex:: Data types for complex numbers.
* Floating Types:: Additional Floating Types.
* Half-Precision:: Half-Precision Floating Point.
@@ -40,8 +40,8 @@ extensions, accepted by GCC in C90 mode and in C++.
* Fixed-Point:: Fixed-Point Types.
* Named Address Spaces::Named address spaces.
* Zero Length:: Zero-length arrays.
-* Variable Length:: Arrays whose length is computed at run time.
* Empty Structures:: Structures with no members.
+* Variable Length:: Arrays whose length is computed at run time.
* Variadic Macros:: Macros with a variable number of arguments.
* Escaped Newlines:: Slightly looser rules for escaped newlines.
* Subscripting:: Any array can be subscripted, even if not an lvalue.
@@ -50,8 +50,8 @@ extensions, accepted by GCC in C90 mode and in C++.
* Compound Literals:: Compound literals give structures, unions
or arrays as values.
* Designated Inits:: Labeling elements of initializers.
-* Cast to Union:: Casting to union type from any member of the union.
* Case Ranges:: `case 1 ... 9' and such.
+* Cast to Union:: Casting to union type from any member of the union.
* Mixed Declarations:: Mixing declarations and code.
* Function Attributes:: Declaring that functions have no side effects,
or that they can never return.
@@ -2133,7 +2133,8 @@ attributes are currently defined for functions on all targets:
@code{weak}, @code{malloc}, @code{alias}, @code{ifunc},
@code{warn_unused_result}, @code{nonnull}, @code{gnu_inline},
@code{externally_visible}, @code{hot}, @code{cold}, @code{artificial},
-@code{no_address_safety_analysis}, @code{error} and @code{warning}.
+@code{no_sanitize_address}, @code{no_address_safety_analysis},
+@code{error} and @code{warning}.
Several other attributes are defined for functions on particular
target systems. Other attributes, including @code{section} are
supported for variables declarations (@pxref{Variable Attributes})
@@ -3432,11 +3433,15 @@ with computed goto or @code{asm goto}.
The @code{cold} attribute on labels is not implemented in GCC versions
earlier than 4.8.
-@item no_address_safety_analysis
-@cindex @code{no_address_safety_analysis} function attribute
-The @code{no_address_safety_analysis} attribute on functions is used
+@item no_sanitize_address
+@itemx no_address_safety_analysis
+@cindex @code{no_sanitize_address} function attribute
+The @code{no_sanitize_address} attribute on functions is used
to inform the compiler that it should not instrument memory accesses
in the function when compiling with the @option{-fsanitize=address} option.
+The @code{no_address_safety_analysis} is a deprecated alias of the
+@code{no_sanitize_address} attribute, new code should use
+@code{no_sanitize_address}.
@item regparm (@var{number})
@cindex @code{regparm} attribute
@@ -11653,6 +11658,18 @@ else
@end smallexample
@end table
+@node Other MIPS Built-in Functions
+@subsection Other MIPS Built-in Functions
+
+GCC provides other MIPS-specific built-in functions:
+
+@table @code
+@item void __builtin_mips_cache (int @var{op}, const volatile void *@var{addr})
+Insert a @samp{cache} instruction with operands @var{op} and @var{addr}.
+GCC defines the preprocessor macro @code{___GCC_HAVE_BUILTIN_MIPS_CACHE}
+when this function is available.
+@end table
+
@node picoChip Built-in Functions
@subsection picoChip Built-in Functions
@@ -11689,18 +11706,6 @@ implementing assertions.
@end table
-@node Other MIPS Built-in Functions
-@subsection Other MIPS Built-in Functions
-
-GCC provides other MIPS-specific built-in functions:
-
-@table @code
-@item void __builtin_mips_cache (int @var{op}, const volatile void *@var{addr})
-Insert a @samp{cache} instruction with operands @var{op} and @var{addr}.
-GCC defines the preprocessor macro @code{___GCC_HAVE_BUILTIN_MIPS_CACHE}
-when this function is available.
-@end table
-
@node PowerPC Built-in Functions
@subsection PowerPC Built-in Functions
@@ -13791,41 +13796,6 @@ if the VSX instruction set is available. The @samp{vec_vsx_ld} and
@samp{vec_vsx_st} built-in functions always generate the VSX @samp{LXVD2X},
@samp{LXVW4X}, @samp{STXVD2X}, and @samp{STXVW4X} instructions.
-@node SH Built-in Functions
-@subsection SH Built-in Functions
-The following built-in functions are supported on the SH1, SH2, SH3 and SH4
-families of processors:
-
-@deftypefn {Built-in Function} {void} __builtin_set_thread_pointer (void *@var{ptr})
-Sets the @samp{GBR} register to the specified value @var{ptr}. This is usually
-used by system code that manages threads and execution contexts. The compiler
-normally does not generate code that modifies the contents of @samp{GBR} and
-thus the value is preserved across function calls. Changing the @samp{GBR}
-value in user code must be done with caution, since the compiler might use
-@samp{GBR} in order to access thread local variables.
-
-@end deftypefn
-
-@deftypefn {Built-in Function} {void *} __builtin_thread_pointer (void)
-Returns the value that is currently set in the @samp{GBR} register.
-Memory loads and stores that use the thread pointer as a base address are
-turned into @samp{GBR} based displacement loads and stores, if possible.
-For example:
-@smallexample
-struct my_tcb
-@{
- int a, b, c, d, e;
-@};
-
-int get_tcb_value (void)
-@{
- // Generate @samp{mov.l @@(8,gbr),r0} instruction
- return ((my_tcb*)__builtin_thread_pointer ())->c;
-@}
-
-@end smallexample
-@end deftypefn
-
@node RX Built-in Functions
@subsection RX Built-in Functions
GCC supports some of the RX instructions which cannot be expressed in
@@ -13941,6 +13911,41 @@ bit in the processor status word.
Generates the @code{wait} machine instruction.
@end deftypefn
+@node SH Built-in Functions
+@subsection SH Built-in Functions
+The following built-in functions are supported on the SH1, SH2, SH3 and SH4
+families of processors:
+
+@deftypefn {Built-in Function} {void} __builtin_set_thread_pointer (void *@var{ptr})
+Sets the @samp{GBR} register to the specified value @var{ptr}. This is usually
+used by system code that manages threads and execution contexts. The compiler
+normally does not generate code that modifies the contents of @samp{GBR} and
+thus the value is preserved across function calls. Changing the @samp{GBR}
+value in user code must be done with caution, since the compiler might use
+@samp{GBR} in order to access thread local variables.
+
+@end deftypefn
+
+@deftypefn {Built-in Function} {void *} __builtin_thread_pointer (void)
+Returns the value that is currently set in the @samp{GBR} register.
+Memory loads and stores that use the thread pointer as a base address are
+turned into @samp{GBR} based displacement loads and stores, if possible.
+For example:
+@smallexample
+struct my_tcb
+@{
+ int a, b, c, d, e;
+@};
+
+int get_tcb_value (void)
+@{
+ // Generate @samp{mov.l @@(8,gbr),r0} instruction
+ return ((my_tcb*)__builtin_thread_pointer ())->c;
+@}
+
+@end smallexample
+@end deftypefn
+
@node SPARC VIS Built-in Functions
@subsection SPARC VIS Built-in Functions
diff --git a/gcc/doc/gcc.texi b/gcc/doc/gcc.texi
index 8f6f11f44bf..02b81cf86ec 100644
--- a/gcc/doc/gcc.texi
+++ b/gcc/doc/gcc.texi
@@ -132,8 +132,8 @@ Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
* Standards:: Language standards supported by GCC.
* Invoking GCC:: Command options supported by @samp{gcc}.
* C Implementation:: How GCC implements the ISO C specification.
-* C Extensions:: GNU extensions to the C language family.
* C++ Implementation:: How GCC implements the ISO C++ specification.
+* C Extensions:: GNU extensions to the C language family.
* C++ Extensions:: GNU extensions to the C++ language.
* Objective-C:: GNU Objective-C runtime features.
* Compatibility:: Binary Compatibility
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi
index a7521781db3..82e8e4f728f 100644
--- a/gcc/doc/gty.texi
+++ b/gcc/doc/gty.texi
@@ -87,8 +87,8 @@ data members.
@menu
* GTY Options:: What goes inside a @code{GTY(())}.
-* GGC Roots:: Making global variables GGC roots.
* User GC:: Adding user-provided GC marking routines.
+* GGC Roots:: Making global variables GGC roots.
* Files:: How the generated files work.
* Invoking the garbage collector:: How to invoke the garbage collector.
* Troubleshooting:: When something does not work as expected.
@@ -515,7 +515,7 @@ Note that the rules for the pointer walker @code{gt_pch_nx (my_struct
case, the operation @code{op} must be applied to the @emph{address} of
every pointer field.
-@section User-provided marking routines for template types
+@subsection User-provided marking routines for template types
When a template type @code{TP} is marked with @code{GTY}, all
instances of that type are considered user-provided types. This means
that the individual instances of @code{TP} do not need to be marked
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 72f83408dab..b8aa61f2524 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2464,7 +2464,9 @@ union U @{
@opindex Wno-ctor-dtor-privacy
Warn when a class seems unusable because all the constructors or
destructors in that class are private, and it has neither friends nor
-public static member functions.
+public static member functions. Also warn if there are no non-private
+methods, and there's at least one private member function that isn't
+a constructor or destructor.
@item -Wdelete-non-virtual-dtor @r{(C++ and Objective-C++ only)}
@opindex Wdelete-non-virtual-dtor
@@ -5040,6 +5042,18 @@ other options are processed, and it does so only once, no matter how
many times it is given. This is mainly intended to be used with
@option{-fcompare-debug}.
+@item -fsanitize=address
+Enable AddressSanitizer, a fast memory error detector.
+Memory access instructions will be instrumented to detect
+out-of-bounds and use-after-free bugs.
+See @uref{http://code.google.com/p/address-sanitizer/} for more details.
+
+@item -fsanitize=thread
+Enable ThreadSanitizer, a fast data race detector.
+Memory access instructions will be instrumented to detect
+data race bugs.
+See @uref{http://code.google.com/p/data-race-test/wiki/ThreadSanitizer} for more details.
+
@item -fdump-final-insns@r{[}=@var{file}@r{]}
@opindex fdump-final-insns
Dump the final internal representation (RTL) to @var{file}. If the
@@ -6873,18 +6887,6 @@ assumptions based on that.
The default is @option{-fzero-initialized-in-bss}.
-@item -fsanitize=address
-Enable AddressSanitizer, a fast memory error detector.
-Memory access instructions will be instrumented to detect
-out-of-bounds and use-after-free bugs.
-See @uref{http://code.google.com/p/address-sanitizer/} for more details.
-
-@item -fsanitize=thread
-Enable ThreadSanitizer, a fast data race detector.
-Memory access instructions will be instrumented to detect
-data race bugs.
-See @uref{http://code.google.com/p/data-race-test/wiki/ThreadSanitizer} for more details.
-
@item -fmudflap -fmudflapth -fmudflapir
@opindex fmudflap
@opindex fmudflapth
@@ -10867,6 +10869,125 @@ platform.
* zSeries Options::
@end menu
+@node AArch64 Options
+@subsection AArch64 Options
+@cindex AArch64 Options
+
+These options are defined for AArch64 implementations:
+
+@table @gcctabopt
+
+@item -mbig-endian
+@opindex mbig-endian
+Generate big-endian code. This is the default when GCC is configured for an
+@samp{aarch64_be-*-*} target.
+
+@item -mgeneral-regs-only
+@opindex mgeneral-regs-only
+Generate code which uses only the general registers.
+
+@item -mlittle-endian
+@opindex mlittle-endian
+Generate little-endian code. This is the default when GCC is configured for an
+@samp{aarch64-*-*} but not an @samp{aarch64_be-*-*} target.
+
+@item -mcmodel=tiny
+@opindex mcmodel=tiny
+Generate code for the tiny code model. The program and its statically defined
+symbols must be within 1GB of each other. Pointers are 64 bits. Programs can
+be statically or dynamically linked. This model is not fully implemented and
+mostly treated as @samp{small}.
+
+@item -mcmodel=small
+@opindex mcmodel=small
+Generate code for the small code model. The program and its statically defined
+symbols must be within 4GB of each other. Pointers are 64 bits. Programs can
+be statically or dynamically linked. This is the default code model.
+
+@item -mcmodel=large
+@opindex mcmodel=large
+Generate code for the large code model. This makes no assumptions about
+addresses and sizes of sections. Pointers are 64 bits. Programs can be
+statically linked only.
+
+@item -mstrict-align
+@opindex mstrict-align
+Do not assume that unaligned memory references will be handled by the system.
+
+@item -momit-leaf-frame-pointer
+@itemx -mno-omit-leaf-frame-pointer
+@opindex momit-leaf-frame-pointer
+@opindex mno-omit-leaf-frame-pointer
+Omit or keep the frame pointer in leaf functions. The former behaviour is the
+default.
+
+@item -mtls-dialect=desc
+@opindex mtls-dialect=desc
+Use TLS descriptors as the thread-local storage mechanism for dynamic accesses
+of TLS variables. This is the default.
+
+@item -mtls-dialect=traditional
+@opindex mtls-dialect=traditional
+Use traditional TLS as the thread-local storage mechanism for dynamic accesses
+of TLS variables.
+
+@item -march=@var{name}
+@opindex march
+Specify the name of the target architecture, optionally suffixed by one or
+more feature modifiers. This option has the form
+@option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
+only value for @var{arch} is @samp{armv8-a}. The possible values for
+@var{feature} are documented in the sub-section below.
+
+Where conflicting feature modifiers are specified, the right-most feature is
+used.
+
+GCC uses this name to determine what kind of instructions it can emit when
+generating assembly code. This option can be used in conjunction with or
+instead of the @option{-mcpu=} option.
+
+@item -mcpu=@var{name}
+@opindex mcpu
+Specify the name of the target processor, optionally suffixed by one or more
+feature modifiers. This option has the form
+@option{-mcpu=@var{cpu}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
+possible values for @var{cpu} are @samp{generic}, @samp{large}. The
+possible values for @var{feature} are documented in the sub-section
+below.
+
+Where conflicting feature modifiers are specified, the right-most feature is
+used.
+
+GCC uses this name to determine what kind of instructions it can emit when
+generating assembly code.
+
+@item -mtune=@var{name}
+@opindex mtune
+Specify the name of the processor to tune the performance for. The code will
+be tuned as if the target processor were of the type specified in this option,
+but still using instructions compatible with the target processor specified
+by a @option{-mcpu=} option. This option cannot be suffixed by feature
+modifiers.
+
+@end table
+
+@subsubsection @option{-march} and @option{-mcpu} feature modifiers
+@cindex @option{-march} feature modifiers
+@cindex @option{-mcpu} feature modifiers
+Feature modifiers used with @option{-march} and @option{-mcpu} can be one
+the following:
+
+@table @samp
+@item crypto
+Enable Crypto extension. This implies Advanced SIMD is enabled.
+@item fp
+Enable floating-point instructions.
+@item simd
+Enable Advanced SIMD instructions. This implies floating-point instructions
+are enabled. This is the default for all current possible values for options
+@option{-march} and @option{-mcpu=}.
+@end table
+
@node Adapteva Epiphany Options
@subsection Adapteva Epiphany Options
@@ -11023,125 +11144,6 @@ purpose. The default is @option{-m1reg-none}.
@end table
-@node AArch64 Options
-@subsection AArch64 Options
-@cindex AArch64 Options
-
-These options are defined for AArch64 implementations:
-
-@table @gcctabopt
-
-@item -mbig-endian
-@opindex mbig-endian
-Generate big-endian code. This is the default when GCC is configured for an
-@samp{aarch64_be-*-*} target.
-
-@item -mgeneral-regs-only
-@opindex mgeneral-regs-only
-Generate code which uses only the general registers.
-
-@item -mlittle-endian
-@opindex mlittle-endian
-Generate little-endian code. This is the default when GCC is configured for an
-@samp{aarch64-*-*} but not an @samp{aarch64_be-*-*} target.
-
-@item -mcmodel=tiny
-@opindex mcmodel=tiny
-Generate code for the tiny code model. The program and its statically defined
-symbols must be within 1GB of each other. Pointers are 64 bits. Programs can
-be statically or dynamically linked. This model is not fully implemented and
-mostly treated as @samp{small}.
-
-@item -mcmodel=small
-@opindex mcmodel=small
-Generate code for the small code model. The program and its statically defined
-symbols must be within 4GB of each other. Pointers are 64 bits. Programs can
-be statically or dynamically linked. This is the default code model.
-
-@item -mcmodel=large
-@opindex mcmodel=large
-Generate code for the large code model. This makes no assumptions about
-addresses and sizes of sections. Pointers are 64 bits. Programs can be
-statically linked only.
-
-@item -mstrict-align
-@opindex mstrict-align
-Do not assume that unaligned memory references will be handled by the system.
-
-@item -momit-leaf-frame-pointer
-@itemx -mno-omit-leaf-frame-pointer
-@opindex momit-leaf-frame-pointer
-@opindex mno-omit-leaf-frame-pointer
-Omit or keep the frame pointer in leaf functions. The former behaviour is the
-default.
-
-@item -mtls-dialect=desc
-@opindex mtls-dialect=desc
-Use TLS descriptors as the thread-local storage mechanism for dynamic accesses
-of TLS variables. This is the default.
-
-@item -mtls-dialect=traditional
-@opindex mtls-dialect=traditional
-Use traditional TLS as the thread-local storage mechanism for dynamic accesses
-of TLS variables.
-
-@item -march=@var{name}
-@opindex march
-Specify the name of the target architecture, optionally suffixed by one or
-more feature modifiers. This option has the form
-@option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
-only value for @var{arch} is @samp{armv8-a}. The possible values for
-@var{feature} are documented in the sub-section below.
-
-Where conflicting feature modifiers are specified, the right-most feature is
-used.
-
-GCC uses this name to determine what kind of instructions it can emit when
-generating assembly code. This option can be used in conjunction with or
-instead of the @option{-mcpu=} option.
-
-@item -mcpu=@var{name}
-@opindex mcpu
-Specify the name of the target processor, optionally suffixed by one or more
-feature modifiers. This option has the form
-@option{-mcpu=@var{cpu}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
-possible values for @var{cpu} are @samp{generic}, @samp{large}. The
-possible values for @var{feature} are documented in the sub-section
-below.
-
-Where conflicting feature modifiers are specified, the right-most feature is
-used.
-
-GCC uses this name to determine what kind of instructions it can emit when
-generating assembly code.
-
-@item -mtune=@var{name}
-@opindex mtune
-Specify the name of the processor to tune the performance for. The code will
-be tuned as if the target processor were of the type specified in this option,
-but still using instructions compatible with the target processor specified
-by a @option{-mcpu=} option. This option cannot be suffixed by feature
-modifiers.
-
-@end table
-
-@subsubsection @option{-march} and @option{-mcpu} feature modifiers
-@cindex @option{-march} feature modifiers
-@cindex @option{-mcpu} feature modifiers
-Feature modifiers used with @option{-march} and @option{-mcpu} can be one
-the following:
-
-@table @samp
-@item crypto
-Enable Crypto extension. This implies Advanced SIMD is enabled.
-@item fp
-Enable floating-point instructions.
-@item simd
-Enable Advanced SIMD instructions. This implies floating-point instructions
-are enabled. This is the default for all current possible values for options
-@option{-march} and @option{-mcpu=}.
-@end table
-
@node ARM Options
@subsection ARM Options
@cindex ARM options
@@ -15897,7 +15899,7 @@ The processor names are:
@samp{octeon}, @samp{octeon+}, @samp{octeon2},
@samp{orion},
@samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
-@samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000},
+@samp{r4600}, @samp{r4650}, @samp{r4700}, @samp{r6000}, @samp{r8000},
@samp{rm7000}, @samp{rm9000},
@samp{r10000}, @samp{r12000}, @samp{r14000}, @samp{r16000},
@samp{sb1},
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 9739e4f8f79..63ec92f6b25 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -1079,8 +1079,8 @@ the addressing register.
* Multi-Alternative:: When an insn has two alternative constraint-patterns.
* Class Preferences:: Constraints guide which hard register to put things in.
* Modifiers:: More precise control over effects of constraints.
-* Disable Insn Alternatives:: Disable insn alternatives using the @code{enabled} attribute.
* Machine Constraints:: Existing constraints for some particular machines.
+* Disable Insn Alternatives:: Disable insn alternatives using the @code{enabled} attribute.
* Define Constraints:: How to define machine-specific constraints.
* C Constraint Interface:: How to test constraints from C code.
@end menu
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5acb4ad0059..26cfc0e83e4 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2542,19 +2542,25 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
case tcc_reference:
/* If either of the pointer (or reference) expressions we are
- dereferencing contain a side effect, these cannot be equal. */
- if (TREE_SIDE_EFFECTS (arg0)
- || TREE_SIDE_EFFECTS (arg1))
+ dereferencing contain a side effect, these cannot be equal,
+ but their addresses can be. */
+ if ((flags & OEP_CONSTANT_ADDRESS_OF) == 0
+ && (TREE_SIDE_EFFECTS (arg0)
+ || TREE_SIDE_EFFECTS (arg1)))
return 0;
switch (TREE_CODE (arg0))
{
case INDIRECT_REF:
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
+ return OP_SAME (0);
+
case REALPART_EXPR:
case IMAGPART_EXPR:
return OP_SAME (0);
case TARGET_MEM_REF:
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
/* Require equal extra operands and then fall through to MEM_REF
handling of the two common operands. */
if (!OP_SAME_WITH_NULL (2)
@@ -2563,6 +2569,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
return 0;
/* Fallthru. */
case MEM_REF:
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
/* Require equal access sizes, and similar pointer types.
We can have incomplete types for array references of
variable-sized arrays from the Fortran frontent
@@ -2581,22 +2588,28 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
/* Operands 2 and 3 may be null.
Compare the array index by value if it is constant first as we
may have different types but same value here. */
- return (OP_SAME (0)
- && (tree_int_cst_equal (TREE_OPERAND (arg0, 1),
- TREE_OPERAND (arg1, 1))
- || OP_SAME (1))
+ if (!OP_SAME (0))
+ return 0;
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
+ return ((tree_int_cst_equal (TREE_OPERAND (arg0, 1),
+ TREE_OPERAND (arg1, 1))
+ || OP_SAME (1))
&& OP_SAME_WITH_NULL (2)
&& OP_SAME_WITH_NULL (3));
case COMPONENT_REF:
/* Handle operand 2 the same as for ARRAY_REF. Operand 0
may be NULL when we're called to compare MEM_EXPRs. */
- return OP_SAME_WITH_NULL (0)
- && OP_SAME (1)
- && OP_SAME_WITH_NULL (2);
+ if (!OP_SAME_WITH_NULL (0))
+ return 0;
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
+ return OP_SAME (1) && OP_SAME_WITH_NULL (2);
case BIT_FIELD_REF:
- return OP_SAME (0) && OP_SAME (1) && OP_SAME (2);
+ if (!OP_SAME (0))
+ return 0;
+ flags &= ~OEP_CONSTANT_ADDRESS_OF;
+ return OP_SAME (1) && OP_SAME (2);
default:
return 0;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 2bea99664f0..499347f247b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-01 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56491
+ * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
+ * symbol.c (free_components): Free proc-pointer components.
+
+2013-03-01 Tobias Burnus <burnus@net-b.de>
+
+ * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
+ * trans-io.c (build_dt): Ditto.
+
2013-02-24 Joseph Myers <joseph@codesourcery.com>
* resolve.c (generate_component_assignments): Don't use UTF-8
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index 36e5363d39d..5b2f8c7b44e 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -140,7 +140,7 @@ resolve_bound (gfc_expr *f, gfc_expr *array, gfc_expr *dim, gfc_expr *kind,
}
}
- f->value.function.name = xstrdup (name);
+ f->value.function.name = gfc_get_string (name);
}
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index acfebc55831..ad88da8a963 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2076,6 +2076,7 @@ free_components (gfc_component *p)
gfc_free_array_spec (p->as);
gfc_free_expr (p->initializer);
+ free (p->tb);
free (p);
}
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 337d747520f..7806bbbd878 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -3818,10 +3818,12 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
NULL_TREE, true, NULL,
true);
else
- tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE,
- true,
- gfc_lval_expr_from_sym (sym),
- sym->ts);
+ {
+ gfc_expr *expr = gfc_lval_expr_from_sym (sym);
+ tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE,
+ true, expr, sym->ts);
+ gfc_free_expr (expr);
+ }
}
if (sym->ts.type == BT_CLASS)
{
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index bb5fa2423a6..9394810f01f 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -1782,6 +1782,8 @@ build_dt (tree function, gfc_code * code)
mask |= set_string (&block, &post_block, var, IOPARM_dt_namelist_name,
nmlname);
+ gfc_free_expr (nmlname);
+
if (last_dt == READ)
mask |= IOPARM_dt_namelist_read_mode;
diff --git a/gcc/incpath.c b/gcc/incpath.c
index 0e61b8b747a..018da982c14 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -149,12 +149,17 @@ add_standard_paths (const char *sysroot, const char *iprefix,
{
char *str = concat (iprefix, p->fname + len, NULL);
if (p->multilib == 1 && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
+ str = reconcat (str, str, dir_separator_str,
+ imultilib, NULL);
else if (p->multilib == 2)
{
if (!imultiarch)
- continue;
- str = concat (str, dir_separator_str, imultiarch, NULL);
+ {
+ free (str);
+ continue;
+ }
+ str = reconcat (str, str, dir_separator_str,
+ imultiarch, NULL);
}
add_path (str, SYSTEM, p->cxx_aware, false);
}
@@ -183,6 +188,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
&& !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len))
{
static const char *relocated_prefix;
+ char *ostr;
/* If this path starts with the configure-time prefix,
but the compiler has been relocated, replace it
with the run-time prefix. The run-time exec prefix
@@ -198,22 +204,27 @@ add_standard_paths (const char *sysroot, const char *iprefix,
= make_relative_prefix (dummy,
cpp_EXEC_PREFIX,
cpp_PREFIX);
+ free (dummy);
}
- str = concat (relocated_prefix,
- p->fname + cpp_PREFIX_len,
- NULL);
- str = update_path (str, p->component);
+ ostr = concat (relocated_prefix,
+ p->fname + cpp_PREFIX_len,
+ NULL);
+ str = update_path (ostr, p->component);
+ free (ostr);
}
else
str = update_path (p->fname, p->component);
if (p->multilib == 1 && imultilib)
- str = concat (str, dir_separator_str, imultilib, NULL);
+ str = reconcat (str, str, dir_separator_str, imultilib, NULL);
else if (p->multilib == 2)
{
if (!imultiarch)
- continue;
- str = concat (str, dir_separator_str, imultiarch, NULL);
+ {
+ free (str);
+ continue;
+ }
+ str = reconcat (str, str, dir_separator_str, imultiarch, NULL);
}
add_path (str, SYSTEM, p->cxx_aware, false);
diff --git a/gcc/insn-notes.def b/gcc/insn-notes.def
index 9c1523edb3e..1a9883cefe0 100644
--- a/gcc/insn-notes.def
+++ b/gcc/insn-notes.def
@@ -70,7 +70,9 @@ INSN_NOTE (CALL_ARG_LOCATION)
/* Record the struct for the following basic block. Uses
NOTE_BASIC_BLOCK. FIXME: Redundant with the basic block pointer
- now included in every insn. */
+ now included in every insn. NOTE: If there's no CFG anymore, in other words,
+ if BLOCK_FOR_INSN () == NULL, NOTE_BASIC_BLOCK cannot be considered reliable
+ anymore. */
INSN_NOTE (BASIC_BLOCK)
/* Mark the inflection point in the instruction stream where we switch
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 9a67f3c0be3..d01b053a3f9 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3406,6 +3406,9 @@ decide_whether_version_node (struct cgraph_node *node)
info = IPA_NODE_REF (node);
info->do_clone_for_all_contexts = false;
IPA_NODE_REF (clone)->is_all_contexts_clone = true;
+ for (i = 0; i < count ; i++)
+ vec_free (known_aggs[i].items);
+ known_aggs.release ();
ret = true;
}
else
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 07ba90fa19b..94c7315c124 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1479,7 +1479,7 @@ propagate (void)
propagate_pure_const ();
/* Cleanup. */
- FOR_EACH_DEFINED_FUNCTION (node)
+ FOR_EACH_FUNCTION (node)
if (has_function_state (node))
free (get_function_state (node));
funct_state_vec.release ();
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 98c2056839c..f3c483f67f9 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -834,12 +834,10 @@ propagate (void)
ipa_reference_global_vars_info_t node_g;
ipa_reference_optimization_summary_t opt;
- if (node->alias)
- continue;
-
node_info = get_reference_vars_info (node);
- if (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE
- || (flags_from_decl_or_type (node->symbol.decl) & ECF_LEAF))
+ if (!node->alias
+ && (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE
+ || (flags_from_decl_or_type (node->symbol.decl) & ECF_LEAF)))
{
node_g = &node_info->global;
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index dd66091a335..b1e481bdb05 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -57,6 +57,9 @@ ira_loop_tree_node_t ira_bb_nodes;
array. */
ira_loop_tree_node_t ira_loop_nodes;
+/* And size of the ira_loop_nodes array. */
+unsigned int ira_loop_nodes_count;
+
/* Map regno -> allocnos with given regno (see comments for
allocno member `next_regno_allocno'). */
ira_allocno_t *ira_regno_allocno_map;
@@ -142,14 +145,16 @@ create_loop_tree_nodes (void)
}
if (current_loops == NULL)
{
+ ira_loop_nodes_count = 1;
ira_loop_nodes = ((struct ira_loop_tree_node *)
ira_allocate (sizeof (struct ira_loop_tree_node)));
init_loop_tree_node (ira_loop_nodes, 0);
return;
}
+ ira_loop_nodes_count = number_of_loops ();
ira_loop_nodes = ((struct ira_loop_tree_node *)
ira_allocate (sizeof (struct ira_loop_tree_node)
- * number_of_loops ()));
+ * ira_loop_nodes_count));
FOR_EACH_VEC_SAFE_ELT (get_loops (), i, loop)
{
if (loop_outer (loop) != NULL)
@@ -217,13 +222,9 @@ static void
finish_loop_tree_nodes (void)
{
unsigned int i;
- loop_p loop;
- if (current_loops == NULL)
- finish_loop_tree_node (&ira_loop_nodes[0]);
- else
- FOR_EACH_VEC_SAFE_ELT (get_loops (), i, loop)
- finish_loop_tree_node (&ira_loop_nodes[i]);
+ for (i = 0; i < ira_loop_nodes_count; i++)
+ finish_loop_tree_node (&ira_loop_nodes[i]);
ira_free (ira_loop_nodes);
for (i = 0; i < (unsigned int) last_basic_block_before_change; i++)
{
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 42512b8d978..1eb904b5061 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -207,7 +207,7 @@ void
unroll_and_peel_loops (int flags)
{
struct loop *loop;
- bool check;
+ bool changed = false;
loop_iterator li;
/* First perform complete loop peeling (it is almost surely a win,
@@ -220,7 +220,6 @@ unroll_and_peel_loops (int flags)
/* Scan the loops, inner ones first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
{
- check = true;
/* And perform the appropriate transformations. */
switch (loop->lpt_decision.decision)
{
@@ -229,30 +228,33 @@ unroll_and_peel_loops (int flags)
gcc_unreachable ();
case LPT_PEEL_SIMPLE:
peel_loop_simple (loop);
+ changed = true;
break;
case LPT_UNROLL_CONSTANT:
unroll_loop_constant_iterations (loop);
+ changed = true;
break;
case LPT_UNROLL_RUNTIME:
unroll_loop_runtime_iterations (loop);
+ changed = true;
break;
case LPT_UNROLL_STUPID:
unroll_loop_stupid (loop);
+ changed = true;
break;
case LPT_NONE:
- check = false;
break;
default:
gcc_unreachable ();
}
- if (check)
- {
-#ifdef ENABLE_CHECKING
- verify_loop_structure ();
-#endif
- }
}
+ if (changed)
+ {
+ calculate_dominance_info (CDI_DOMINATORS);
+ fix_loop_structure (NULL);
+ }
+
iv_analysis_done ();
}
@@ -283,6 +285,7 @@ peel_loops_completely (int flags)
{
struct loop *loop;
loop_iterator li;
+ bool changed = false;
/* Scan the loops, the inner ones first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
@@ -306,11 +309,15 @@ peel_loops_completely (int flags)
{
report_unroll_peel (loop, locus);
peel_loop_completely (loop);
-#ifdef ENABLE_CHECKING
- verify_loop_structure ();
-#endif
+ changed = true;
}
}
+
+ if (changed)
+ {
+ calculate_dominance_info (CDI_DOMINATORS);
+ fix_loop_structure (NULL);
+ }
}
/* Decide whether unroll or peel loops (depending on FLAGS) and how much. */
diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c
index 6ac80beb9b4..163ca11509d 100644
--- a/gcc/lra-spills.c
+++ b/gcc/lra-spills.c
@@ -568,6 +568,7 @@ lra_spill (void)
free (slots);
free (pseudo_slots);
free (pseudo_regnos);
+ free (spill_hard_reg);
}
/* Apply alter_subreg for subregs of regs in *LOC. Use FINAL_P for
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 529318247e2..15a34dd6956 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -915,6 +915,8 @@ main (int argc, char *argv[])
{
const char *p;
+ gcc_obstack_init (&opts_obstack);
+
p = argv[0] + strlen (argv[0]);
while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
--p;
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index 1dd872a638c..95ca5841acc 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -276,7 +276,7 @@ generate_canonical_option (size_t opt_index, const char *arg, int value,
&& !option->cl_reject_negative
&& (opt_text[1] == 'W' || opt_text[1] == 'f' || opt_text[1] == 'm'))
{
- char *t = XNEWVEC (char, option->opt_len + 5);
+ char *t = XOBNEWVEC (&opts_obstack, char, option->opt_len + 5);
t[0] = '-';
t[1] = opt_text[1];
t[2] = 'n';
@@ -301,11 +301,9 @@ generate_canonical_option (size_t opt_index, const char *arg, int value,
else
{
gcc_assert (option->flags & CL_JOINED);
- decoded->canonical_option[0] = concat (opt_text, arg, NULL);
+ decoded->canonical_option[0] = opts_concat (opt_text, arg, NULL);
decoded->canonical_option[1] = NULL;
decoded->canonical_option_num_elements = 1;
- if (opt_text != option->opt_text)
- free (CONST_CAST (char *, opt_text));
}
}
else
@@ -590,7 +588,7 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
{
size_t j;
size_t len = strlen (arg);
- char *arg_lower = XNEWVEC (char, len + 1);
+ char *arg_lower = XOBNEWVEC (&opts_obstack, char, len + 1);
for (j = 0; j < len; j++)
arg_lower[j] = TOLOWER ((unsigned char) arg[j]);
@@ -670,7 +668,8 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
decoded->canonical_option_num_elements = result;
}
}
- decoded->orig_option_with_args_text = p = XNEWVEC (char, total_len);
+ decoded->orig_option_with_args_text
+ = p = XOBNEWVEC (&opts_obstack, char, total_len);
for (i = 0; i < result; i++)
{
size_t len = strlen (argv[i]);
@@ -932,8 +931,8 @@ generate_option (size_t opt_index, const char *arg, int value,
case 2:
decoded->orig_option_with_args_text
- = concat (decoded->canonical_option[0], " ",
- decoded->canonical_option[1], NULL);
+ = opts_concat (decoded->canonical_option[0], " ",
+ decoded->canonical_option[1], NULL);
break;
default:
diff --git a/gcc/opts.c b/gcc/opts.c
index db6ae7f0ae8..44239acb906 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -268,6 +268,40 @@ add_comma_separated_to_vector (void **pvec, const char *arg)
*pvec = v;
}
+/* Like libiberty concat, but allocate using opts_obstack. */
+
+char *
+opts_concat (const char *first, ...)
+{
+ char *newstr, *end;
+ size_t length = 0;
+ const char *arg;
+ va_list ap;
+
+ /* First compute the size of the result and get sufficient memory. */
+ va_start (ap, first);
+ for (arg = first; arg; arg = va_arg (ap, const char *))
+ length += strlen (arg);
+ newstr = XOBNEWVEC (&opts_obstack, char, length + 1);
+ va_end (ap);
+
+ /* Now copy the individual pieces to the result string. */
+ va_start (ap, first);
+ for (arg = first, end = newstr; arg; arg = va_arg (ap, const char *))
+ {
+ length = strlen (arg);
+ memcpy (end, arg, length);
+ end += length;
+ }
+ *end = '\0';
+ va_end (ap);
+ return newstr;
+}
+
+/* Obstack for option strings. */
+
+struct obstack opts_obstack;
+
/* Initialize OPTS and OPTS_SET before using them in parsing options. */
void
@@ -275,6 +309,8 @@ init_options_struct (struct gcc_options *opts, struct gcc_options *opts_set)
{
size_t num_params = get_num_compiler_params ();
+ gcc_obstack_init (&opts_obstack);
+
*opts = global_options_init;
memset (opts_set, 0, sizeof (*opts_set));
@@ -638,8 +674,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
directory, typically the directory to contain the object
file. */
if (opts->x_dump_dir_name)
- opts->x_dump_base_name = concat (opts->x_dump_dir_name,
- opts->x_dump_base_name, NULL);
+ opts->x_dump_base_name = opts_concat (opts->x_dump_dir_name,
+ opts->x_dump_base_name, NULL);
else if (opts->x_aux_base_name
&& strcmp (opts->x_aux_base_name, HOST_BIT_BUCKET) != 0)
{
@@ -649,8 +685,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
if (opts->x_aux_base_name != aux_base)
{
int dir_len = aux_base - opts->x_aux_base_name;
- char *new_dump_base_name =
- XNEWVEC (char, strlen (opts->x_dump_base_name) + dir_len + 1);
+ char *new_dump_base_name
+ = XOBNEWVEC (&opts_obstack, char,
+ strlen (opts->x_dump_base_name) + dir_len + 1);
/* Copy directory component from OPTS->X_AUX_BASE_NAME. */
memcpy (new_dump_base_name, opts->x_aux_base_name, dir_len);
diff --git a/gcc/opts.h b/gcc/opts.h
index 723c20bfe11..264f4de7daa 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "vec.h"
+#include "obstack.h"
/* Specifies how a switch's VAR_VALUE relates to its FLAG_VAR. */
enum cl_var_type {
@@ -304,6 +305,12 @@ extern const char **in_fnames;
extern unsigned num_in_fnames;
+extern char *opts_concat (const char *first, ...);
+
+/* Obstack for option strings. */
+
+extern struct obstack opts_obstack;
+
size_t find_opt (const char *input, unsigned int lang_mask);
extern int integral_argument (const char *arg);
extern bool enum_value_to_arg (const struct cl_enum_arg *enum_args,
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 7de974b6358..be6e7bb9514 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -3317,9 +3317,9 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn)
SET_REGNO_REG_SET (&deps->reg_last_in_use, i);
}
- /* Flush pending lists on jumps, but not on speculative checks. */
- if (JUMP_P (insn) && !(sel_sched_p ()
- && sel_insn_is_speculation_check (insn)))
+ /* Don't flush pending lists on speculative checks for
+ selective scheduling. */
+ if (!sel_sched_p () || !sel_insn_is_speculation_check (insn))
flush_pending_lists (deps, insn, true, true);
reg_pending_barrier = NOT_A_BARRIER;
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 39dc52f66d9..ae17351b595 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -1866,8 +1866,12 @@ merge_expr (expr_t to, expr_t from, insn_t split_point)
/* Make sure that speculative pattern is propagated into exprs that
have non-speculative one. This will provide us with consistent
speculative bits and speculative patterns inside expr. */
- if (EXPR_SPEC_DONE_DS (to) == 0
- && EXPR_SPEC_DONE_DS (from) != 0)
+ if ((EXPR_SPEC_DONE_DS (from) != 0
+ && EXPR_SPEC_DONE_DS (to) == 0)
+ /* Do likewise for volatile insns, so that we always retain
+ the may_trap_p bit on the resulting expression. */
+ || (VINSN_MAY_TRAP_P (EXPR_VINSN (from))
+ && !VINSN_MAY_TRAP_P (EXPR_VINSN (to))))
change_vinsn_in_expr (to, EXPR_VINSN (from));
merge_expr_data (to, from, split_point);
diff --git a/gcc/stmt.c b/gcc/stmt.c
index c5ba10b69fa..ca58786c43c 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1760,6 +1760,10 @@ expand_switch_as_decision_tree_p (tree range,
return true;
if (!flag_jump_tables)
return true;
+#ifndef ASM_OUTPUT_ADDR_DIFF_ELT
+ if (flag_pic)
+ return true;
+#endif
/* If the switch is relatively small such that the cost of one
indirect jump on the target are higher than the cost of a
diff --git a/gcc/target-globals.c b/gcc/target-globals.c
index d72495da26d..65ccb8af5e6 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -67,6 +67,7 @@ struct target_globals *
save_target_globals (void)
{
struct target_globals *g;
+ struct target_optabs *saved_this_fn_optabs = this_fn_optabs;
g = ggc_alloc_target_globals ();
g->flag_state = XCNEW (struct target_flag_state);
@@ -86,8 +87,10 @@ save_target_globals (void)
g->bb_reorder = XCNEW (struct target_bb_reorder);
g->lower_subreg = XCNEW (struct target_lower_subreg);
restore_target_globals (g);
+ this_fn_optabs = this_target_optabs;
init_reg_sets ();
target_reinit ();
+ this_fn_optabs = saved_this_fn_optabs;
return g;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 351cb17d8ee..112b6ae37ec 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,144 @@
+2013-03-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52688
+ * g++.dg/template/static33.C: New.
+ * g++.dg/template/static34.C: Likewise.
+
+ PR c++/10291
+ * g++.dg/template/static35.C: New.
+
+2013-03-01 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.dg/pr56396.c: Require pic support.
+
+2013-03-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55481
+ * gcc.dg/torture/pr56488.c: New testcase.
+
+2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/56454
+ * g++.dg/asan/default-options-1.C (__asan_default_options): Use
+ no_sanitize_address attribute rather than no_address_safety_analysis.
+ * g++.dg/asan/sanitizer_test_utils.h
+ (ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): Likewise.
+ * c-c++-common/asan/attrib-1.c: Test no_sanitize_address attribute
+ in addition to no_address_safety_analysis.
+
+2013-02-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/56481
+ * g++.dg/cpp0x/constexpr-and.C: New.
+
+2013-02-28 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/56294
+ * g++.dg/debug/pr56294.C: New test.
+
+2013-02-28 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * g++.old-deja/g++.pt/ptrmem6.C(main): Add xfail aarch64*-*-*.
+
+2013-02-27 Marek Polacek <polacek@redhat.com>
+
+ PR rtl-optimization/56466
+ * gcc.dg/pr56466.c: New test.
+
+2013-02-28 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
+ * gcc.dg/tree-ssa/slsr-2.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-3.c: Likewise.
+
+2013-02-27 Andrey Belevantsev <abel@ispras.ru>
+
+ PR middle-end/45472
+ * gcc.dg/pr45472.c: New test.
+
+2013-02-26 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56426
+ * gcc.dg/pr56436.c: New test.
+
+2013-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56448
+ * gcc.c-torture/compile/pr56448.c: New test.
+
+ PR tree-optimization/56443
+ * gcc.dg/torture/pr56443.c: New test.
+
+2013-02-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56175
+ * gcc.dg/tree-ssa/forwprop-24.c: New testcase.
+
+2013-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56403
+ * g++.dg/torture/pr56403.C: New test.
+
+2013-02-25 Catherine Moore <clm@codesourcery.com>
+
+ Revert:
+ 2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Add microMIPS support.
+ * gcc.target/mips/umips-movep-2.c: New test.
+ * gcc.target/mips/umips-lwp-2.c: New test.
+ * gcc.target/mips/umips-swp-5.c: New test.
+ * gcc.target/mips/umips-constraints-1.c: New test.
+ * gcc.target/mips/umips-lwp-3.c: New test.
+ * gcc.target/mips/umips-swp-6.c: New test.
+ * gcc.target/mips/umips-constraints-2.c: New test.
+ * gcc.target/mips/umips-save-restore-1.c: New test.
+ * gcc.target/mips/umips-lwp-4.c: New test.
+ * gcc.target/mips/umips-swp-7.c: New test.
+ * gcc.target/mips/umips-save-restore-2.c: New test.
+ * gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+ * gcc.target/mips/umips-lwp-5.c: New test.
+ * gcc.target/mips/umips-save-restore-3.c: New test.
+ * gcc.target/mips/umips-lwp-6.c: New test.
+ * gcc.target/mips/umips-swp-1.c: New test.
+ * gcc.target/mips/umips-lwp-7.c: New test.
+ * gcc.target/mips/umips-swp-2.c: New test.
+ * gcc.target/mips/umips-lwp-8.c: New test.
+ * gcc.target/mips/umips-swp-3.c: New test.
+ * gcc.target/mips/umips-movep-1.c: New test.
+ * gcc.target/mips/umips-lwp-1.c: New test.
+ * gcc.target/mips/umips-swp-4.c: New test.
+
+2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Add microMIPS support.
+ * gcc.target/mips/umips-movep-2.c: New test.
+ * gcc.target/mips/umips-lwp-2.c: New test.
+ * gcc.target/mips/umips-swp-5.c: New test.
+ * gcc.target/mips/umips-constraints-1.c: New test.
+ * gcc.target/mips/umips-lwp-3.c: New test.
+ * gcc.target/mips/umips-swp-6.c: New test.
+ * gcc.target/mips/umips-constraints-2.c: New test.
+ * gcc.target/mips/umips-save-restore-1.c: New test.
+ * gcc.target/mips/umips-lwp-4.c: New test.
+ * gcc.target/mips/umips-swp-7.c: New test.
+ * gcc.target/mips/umips-save-restore-2.c: New test.
+ * gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+ * gcc.target/mips/umips-lwp-5.c: New test.
+ * gcc.target/mips/umips-save-restore-3.c: New test.
+ * gcc.target/mips/umips-lwp-6.c: New test.
+ * gcc.target/mips/umips-swp-1.c: New test.
+ * gcc.target/mips/umips-lwp-7.c: New test.
+ * gcc.target/mips/umips-swp-2.c: New test.
+ * gcc.target/mips/umips-lwp-8.c: New test.
+ * gcc.target/mips/umips-swp-3.c: New test.
+ * gcc.target/mips/umips-movep-1.c: New test.
+ * gcc.target/mips/umips-lwp-1.c: New test.
+ * gcc.target/mips/umips-swp-4.c: New test.
+
2013-02-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/56393
diff --git a/gcc/testsuite/c-c++-common/asan/attrib-1.c b/gcc/testsuite/c-c++-common/asan/attrib-1.c
index e633bb6181a..a2a7f7c9f99 100644
--- a/gcc/testsuite/c-c++-common/asan/attrib-1.c
+++ b/gcc/testsuite/c-c++-common/asan/attrib-1.c
@@ -1,7 +1,7 @@
/* PR sanitizer/55435 */
/* { dg-do compile } */
-__attribute__((no_address_safety_analysis)) int
+__attribute__((no_sanitize_address)) int
f1 (int *p, int *q)
{
*p = 42;
@@ -9,8 +9,8 @@ f1 (int *p, int *q)
}
void f2 (char *);
-void f2 (char *) __attribute__((no_address_safety_analysis));
-void f2 (char *) __attribute__((no_address_safety_analysis));
+void f2 (char *) __attribute__((no_sanitize_address));
+void f2 (char *) __attribute__((no_sanitize_address));
void f2 (char *);
void
@@ -20,7 +20,7 @@ f2 (char *p)
}
void f3 (short *);
-__typeof (f3) f3 __attribute__((__no_address_safety_analysis__));
+__typeof (f3) f3 __attribute__((__no_sanitize_address__));
void
f3 (short *p)
@@ -28,7 +28,35 @@ f3 (short *p)
*p = 42;
}
-int v __attribute__((no_address_safety_analysis)); /* { dg-warning "attribute ignored" } */
+__attribute__((no_sanitize_address)) int
+f4 (int *p, int *q)
+{
+ *p = 42;
+ return *q;
+}
+
+void f5 (char *);
+void f5 (char *) __attribute__((no_sanitize_address));
+void f5 (char *) __attribute__((no_sanitize_address));
+void f5 (char *);
+
+void
+f5 (char *p)
+{
+ *p = 42;
+}
+
+void f6 (short *);
+__typeof (f6) f6 __attribute__((__no_address_safety_analysis__));
+
+void
+f6 (short *p)
+{
+ *p = 42;
+}
+
+int v __attribute__((no_sanitize_address)); /* { dg-warning "attribute ignored" } */
+int v2 __attribute__((no_address_safety_analysis)); /* { dg-warning "attribute ignored" } */
/* { dg-final { scan-assembler-not "__asan_report_store" } } */
/* { dg-final { scan-assembler-not "__asan_report_load" } } */
diff --git a/gcc/testsuite/g++.dg/asan/default-options-1.C b/gcc/testsuite/g++.dg/asan/default-options-1.C
index 42b41640afb..cdcb370d141 100644
--- a/gcc/testsuite/g++.dg/asan/default-options-1.C
+++ b/gcc/testsuite/g++.dg/asan/default-options-1.C
@@ -3,7 +3,7 @@
const char *kAsanDefaultOptions="verbosity=1 foo=bar";
extern "C"
-__attribute__((no_address_safety_analysis))
+__attribute__((no_sanitize_address))
const char *__asan_default_options() {
return kAsanDefaultOptions;
}
diff --git a/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h b/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h
index 2184cc76788..99720c354fa 100644
--- a/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h
+++ b/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h
@@ -36,7 +36,7 @@ typedef __int64 int64_t;
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
- __attribute__((no_address_safety_analysis))
+ __attribute__((no_sanitize_address))
#else
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C
new file mode 100644
index 00000000000..15ad2524694
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C
@@ -0,0 +1,20 @@
+// PR c++/56481
+// Non-linearity in potential_constant_expression_1
+// { dg-options -std=c++11 }
+
+struct S
+{
+ constexpr bool foo ();
+#define A(n) , f##n##0, f##n##1, f##n##2, f##n##3
+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
+#define C B(0) B(1) B(2) B(3)
+ bool f C;
+};
+
+constexpr bool
+S::foo ()
+{
+#undef A
+#define A(n) && f##n##0 && f##n##1 && f##n##2 && f##n##3
+ return f C;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C
new file mode 100644
index 00000000000..05735559a72
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C
@@ -0,0 +1,22 @@
+// PR c++/56358
+// { dg-do compile { target c++11 } }
+
+struct foo {
+ explicit foo(int) {}
+};
+
+template<typename T>
+struct bar: T {
+ using T::T;
+
+ // Bad
+ explicit bar(): T(0) {}
+
+ void baz()
+ {
+ // Also bad
+ using qux = T;
+ }
+};
+
+bar<foo> b, b2(42);
diff --git a/gcc/testsuite/g++.dg/debug/pr56294.C b/gcc/testsuite/g++.dg/debug/pr56294.C
new file mode 100644
index 00000000000..204c78eadc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr56294.C
@@ -0,0 +1,30 @@
+// { dg-do compile }
+// { dg-options "-fno-ipa-sra -fcompare-debug" }
+
+struct comp_cost { int cost; unsigned complexity; };
+struct cost_pair { struct iv_cand *cand; };
+struct iv_use { unsigned n_map_members; cost_pair *cost_map; };
+struct iv_cand { unsigned id; };
+
+unsigned gu;
+
+void
+bar (comp_cost, comp_cost)
+{
+}
+
+void
+foo (iv_use *use, iv_cand *cand)
+{
+ unsigned i, s = cand->id & (use->n_map_members - 1);
+ for (i = 0; i < s; i++)
+ if (use->cost_map[i].cand)
+ goto found;
+found:
+ use->cost_map[i].cand = cand;
+ comp_cost elim_cost, express_cost, bound_cost;
+ bar (elim_cost, express_cost);
+ gu = express_cost.complexity;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/inherit/using5.C b/gcc/testsuite/g++.dg/inherit/using5.C
index 89c7ca03ba6..b8e51078ff9 100644
--- a/gcc/testsuite/g++.dg/inherit/using5.C
+++ b/gcc/testsuite/g++.dg/inherit/using5.C
@@ -6,7 +6,7 @@
template<int> struct A
{
- A::A; // { dg-error "constructor" }
+ A::A; // { dg-error "constructor|not a base" }
};
struct B
diff --git a/gcc/testsuite/g++.dg/template/cast3.C b/gcc/testsuite/g++.dg/template/cast3.C
new file mode 100644
index 00000000000..b343ee427b3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/cast3.C
@@ -0,0 +1,22 @@
+// PR c++/56438
+
+struct A { };
+A& operator<<(A&, const char*);
+
+struct B {
+ int size();
+};
+
+struct C { };
+
+template <class S, class T>
+S bar(const S& s, const T& t) {
+ return s;
+}
+
+template<class S, class T>
+void foo() {
+ A a;
+ B b;
+ a << bar(b.size(), C()); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/template/static33.C b/gcc/testsuite/g++.dg/template/static33.C
new file mode 100644
index 00000000000..2d7b97da138
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static33.C
@@ -0,0 +1,18 @@
+// PR c++/52688
+// { dg-do link }
+
+template<typename T>
+T f()
+{
+ static const double staticLocalVariable = 100.0;
+ struct local
+ {
+ static double f() { return staticLocalVariable; }
+ };
+ return T(local::f());
+}
+
+int main()
+{
+ f<double>();
+}
diff --git a/gcc/testsuite/g++.dg/template/static34.C b/gcc/testsuite/g++.dg/template/static34.C
new file mode 100644
index 00000000000..122fffafbcb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static34.C
@@ -0,0 +1,21 @@
+// PR c++/52688
+// { dg-do link }
+
+template<class T>
+struct A {
+ static bool test() {
+ static bool value = false;
+ if (value)
+ return false;
+ struct S {
+ S() { value = true; }
+ };
+ static S s;
+ return true;
+ }
+};
+
+int main()
+{
+ A<int>::test();
+}
diff --git a/gcc/testsuite/g++.dg/template/static35.C b/gcc/testsuite/g++.dg/template/static35.C
new file mode 100644
index 00000000000..d645f249041
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static35.C
@@ -0,0 +1,21 @@
+// PR c++/10291
+// { dg-do link }
+
+template <class T>
+int foo ()
+{
+ static int i;
+
+ struct S {
+ int bar () {
+ return i;
+ }
+ } s;
+
+ return s.bar ();
+}
+
+int main ()
+{
+ foo<int>();
+}
diff --git a/gcc/testsuite/g++.dg/template/virtual4.C b/gcc/testsuite/g++.dg/template/virtual4.C
new file mode 100644
index 00000000000..a2c7420b402
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/virtual4.C
@@ -0,0 +1,30 @@
+// PR c++/56243
+
+struct A
+{
+ virtual int String ();
+};
+
+struct F: A { };
+
+struct G
+{
+ F value;
+};
+
+struct D
+{
+ template <int>
+ void Verify()
+ {
+ G x;
+ F& name = x.value;
+ name.String();
+ }
+};
+
+int main()
+{
+ D d;
+ d.Verify<42>();
+}
diff --git a/gcc/testsuite/g++.dg/tm/pr56419.C b/gcc/testsuite/g++.dg/tm/pr56419.C
new file mode 100644
index 00000000000..c9a33a81319
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr56419.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm" }
+
+int x = 0;
+int inc_func(int i) {
+ for (int j = 0; j < i; ++j)
+ {
+ __transaction_atomic { x+=1; }
+ }
+ return 0;
+}
+
+// { dg-final { scan-assembler "ITM_commitTransaction" } }
diff --git a/gcc/testsuite/g++.dg/torture/pr56403.C b/gcc/testsuite/g++.dg/torture/pr56403.C
new file mode 100644
index 00000000000..27b6eeb8888
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56403.C
@@ -0,0 +1,12 @@
+// PR c++/56403
+// { dg-do compile }
+
+#include <stdarg.h>
+
+struct S { va_list err_args; };
+
+void *
+foo ()
+{
+ return new S ();
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using3.C b/gcc/testsuite/g++.old-deja/g++.other/using3.C
index f30ecbc3d0f..3df78f09691 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/using3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/using3.C
@@ -8,5 +8,5 @@ typedef struct {
} S;
struct B: S{
- using S::S; // { dg-error "" } no such field
+ using S::S; // { dg-error "" "" { target c++98 } } no such field
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
index a4be012d79a..9a537133c4f 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
@@ -25,7 +25,7 @@ int main() {
h<&B::j>(); // { dg-error "" }
g<(void (A::*)()) &A::f>(); // { dg-error "" "" { xfail c++11 } }
h<(int A::*) &A::i>(); // { dg-error "" "" { xfail c++11 } }
- g<(void (A::*)()) &B::f>(); // { dg-error "" "" { xfail { c++11 && { arm*-*-* mips*-*-* } } } }
+ g<(void (A::*)()) &B::f>(); // { dg-error "" "" { xfail { c++11 && { aarch64*-*-* arm*-*-* mips*-*-* } } } }
h<(int A::*) &B::j>(); // { dg-error "" }
g<(void (A::*)()) 0>(); // { dg-error "" "" { target c++98 } }
h<(int A::*) 0>(); // { dg-error "" "" { target c++98 } }
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56448.c b/gcc/testsuite/gcc.c-torture/compile/pr56448.c
new file mode 100644
index 00000000000..f10da6ce752
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56448.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/56448 */
+
+volatile int a[1];
+int b;
+
+void
+foo ()
+{
+ for (;;)
+ {
+ int *c[3][6] = { 0, 0, 0, &b, 0, 0, 0, 0, &b, 0, 0, 0, 0, 0, 0, 0, &b, (int *) &a[0] };
+ b = *c[2][5];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr45472.c b/gcc/testsuite/gcc.dg/pr45472.c
new file mode 100644
index 00000000000..573e83d700c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr45472.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O -fschedule-insns2 -fselective-scheduling2" } */
+
+struct S
+{
+ volatile long vl;
+ int i;
+};
+struct S s1, s2;
+
+void
+foo (int j, int c)
+{
+ int i;
+ for (i = 0; i <= j; i++)
+ {
+ if (c)
+ s2.vl += s1.vl;
+ s1 = s2;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr56396.c b/gcc/testsuite/gcc.dg/pr56396.c
index d2ec8fa9bff..160545b9859 100644
--- a/gcc/testsuite/gcc.dg/pr56396.c
+++ b/gcc/testsuite/gcc.dg/pr56396.c
@@ -1,5 +1,6 @@
/* PR tree-optimization/56396 */
/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fpic -g" } */
struct S { char *s; int z; };
diff --git a/gcc/testsuite/gcc.dg/pr56436.c b/gcc/testsuite/gcc.dg/pr56436.c
new file mode 100644
index 00000000000..cae4d2a4bd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56436.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/56426 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a, *c;
+
+void
+f (void)
+{
+ int b = 0;
+
+ for (a = 0;; a++)
+ if (--b)
+ {
+ if (a)
+ lbl:
+ a++;
+
+ c = &b;
+ goto lbl;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr56466.c b/gcc/testsuite/gcc.dg/pr56466.c
new file mode 100644
index 00000000000..9d9e27356e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56466.c
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/56466 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w -funroll-loops" } */
+
+int a, b, c;
+
+void
+f (void)
+{
+ for (; b; b++)
+ {
+ if (0)
+ for (; b < 0; b++)
+ if (1 % 0)
+ {
+ while (1)
+ {
+ a = 0;
+ lbl1:
+ c++;
+ }
+ lbl2:
+ ;
+ }
+
+ goto lbl1;
+ }
+
+ a = 0;
+ goto lbl2;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56443.c b/gcc/testsuite/gcc.dg/torture/pr56443.c
new file mode 100644
index 00000000000..ed60e05afd0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56443.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/56443 */
+/* { dg-do run } */
+/* { dg-options "-ftree-vectorize" } */
+
+extern void abort (void);
+typedef int myint __attribute__ ((__aligned__ (16)));
+
+int a1[1024] __attribute__ ((__aligned__ (16)));
+int a2[1024] __attribute__ ((__aligned__ (16)));
+
+__attribute__((noinline, noclone)) void
+test (int n, myint * __restrict__ p1, myint * __restrict__ p2)
+{
+ while (n--)
+ *p1++ = *p2++ + 1;
+}
+
+int
+main ()
+{
+ int n;
+ for (n = 0; n < 1024; n++)
+ a2[n] = n;
+ test (1024, a1, a2);
+ for (n = 0; n < 1024; n++)
+ if (a1[n] != a2[n] + 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56488.c b/gcc/testsuite/gcc.dg/torture/pr56488.c
new file mode 100644
index 00000000000..78bac7bede7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56488.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+int a, c, d = 1;
+struct S { int s; } b, f;
+short e;
+
+static void
+foo (int x)
+{
+ int g[] = { };
+ for (e = 0; e != 1; e = e + 5)
+ {
+ int *h[1] = { &g[0] };
+ if (!x)
+ return;
+ f = b;
+ }
+}
+
+int
+main ()
+{
+ int i, j;
+ for (i = 0; i < 6; i++)
+ for (j = 8; j; j--)
+ a = 0;
+ foo (d);
+ while (c)
+ ;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c
new file mode 100644
index 00000000000..74207cf1a81
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+void bar (void);
+unsigned short
+foo (unsigned char x, unsigned short y)
+{
+ unsigned char t = (unsigned char)((x & 1) ^ ((unsigned char)y & 1));
+ if (t == 1)
+ bar ();
+ return y;
+}
+
+/* We should have combined this to require only one bitwise and
+ as in (x ^ (char) y) & 1. */
+
+/* { dg-final { scan-tree-dump-times " & " 1 "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c
index f8c33191b7b..38da1791512 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c
@@ -14,7 +14,7 @@ f (int *p, unsigned int n)
foo (*(p + 48 + n * 4));
}
-/* { dg-final { scan-tree-dump-times "\\+ 128" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 64" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 192" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 128|\\, 128>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 64|\\, 64>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 192|\\, 192>" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c
index 6709ee0f77a..c6bb3e030e9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c
@@ -11,6 +11,6 @@ f (int *p, int n)
foo (*(p + 16 + n * 4));
}
-/* { dg-final { scan-tree-dump-times "\\+ 144" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 96" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 144|\\, 144>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 96|\\, 96>" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c
index a21ee4d8c26..32edf2b77b3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c
@@ -16,7 +16,7 @@ foo (int a[], int b[], int i)
}
/* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 4" 2 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 8" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 12" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 4|\\, 4>" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 8|\\, 8>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 12|\\, 12>" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-constraints-1.c b/gcc/testsuite/gcc.target/mips/umips-constraints-1.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-constraints-1.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-constraints-2.c b/gcc/testsuite/gcc.target/mips/umips-constraints-2.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-constraints-2.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-1.c b/gcc/testsuite/gcc.target/mips/umips-lwp-1.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-1.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-2.c b/gcc/testsuite/gcc.target/mips/umips-lwp-2.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-2.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-3.c b/gcc/testsuite/gcc.target/mips/umips-lwp-3.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-3.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-4.c b/gcc/testsuite/gcc.target/mips/umips-lwp-4.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-4.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-5.c b/gcc/testsuite/gcc.target/mips/umips-lwp-5.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-5.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-6.c b/gcc/testsuite/gcc.target/mips/umips-lwp-6.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-6.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-7.c b/gcc/testsuite/gcc.target/mips/umips-lwp-7.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-7.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-8.c b/gcc/testsuite/gcc.target/mips/umips-lwp-8.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-8.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c b/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-movep-1.c b/gcc/testsuite/gcc.target/mips/umips-movep-1.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-movep-1.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-movep-2.c b/gcc/testsuite/gcc.target/mips/umips-movep-2.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-movep-2.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-1.c b/gcc/testsuite/gcc.target/mips/umips-swp-1.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-1.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-2.c b/gcc/testsuite/gcc.target/mips/umips-swp-2.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-2.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-3.c b/gcc/testsuite/gcc.target/mips/umips-swp-3.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-3.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-4.c b/gcc/testsuite/gcc.target/mips/umips-swp-4.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-4.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-5.c b/gcc/testsuite/gcc.target/mips/umips-swp-5.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-5.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-6.c b/gcc/testsuite/gcc.target/mips/umips-swp-6.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-6.c
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-7.c b/gcc/testsuite/gcc.target/mips/umips-swp-7.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-7.c
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 94e616b7cf6..064d994ad3d 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -822,7 +822,7 @@ remove_forwarder_block_with_phi (basic_block bb)
redirection, replace it with the PHI argument that used
to be on E. */
head = redirect_edge_var_map_vector (e);
- FOR_EACH_VEC_ELT (*head, i, vm)
+ FOR_EACH_VEC_SAFE_ELT (head, i, vm)
{
tree old_arg = redirect_edge_var_map_result (vm);
tree new_arg = redirect_edge_var_map_def (vm);
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 80cb2945dce..20584b8c60f 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -481,7 +481,7 @@ typedef struct _edge_var_map edge_var_map;
/* A vector of var maps. */
-typedef vec<edge_var_map> edge_var_map_vector;
+typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector;
extern void init_tree_ssa (struct function *);
extern void redirect_edge_var_map_add (edge, tree, tree, source_location);
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 234dde22da1..67212c204c4 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2000,8 +2000,7 @@ create_access_replacement (struct access *access)
static inline tree
get_access_replacement (struct access *access)
{
- if (!access->replacement_decl)
- access->replacement_decl = create_access_replacement (access);
+ gcc_checking_assert (access->replacement_decl);
return access->replacement_decl;
}
@@ -2157,7 +2156,6 @@ analyze_access_subtree (struct access *root, struct access *parent,
|| ((root->grp_scalar_read || root->grp_assignment_read)
&& (root->grp_scalar_write || root->grp_assignment_write))))
{
- bool new_integer_type;
/* Always create access replacements that cover the whole access.
For integral types this means the precision has to match.
Avoid assumptions based on the integral type kind, too. */
@@ -2176,22 +2174,19 @@ analyze_access_subtree (struct access *root, struct access *parent,
root->expr = build_ref_for_offset (UNKNOWN_LOCATION,
root->base, root->offset,
root->type, NULL, false);
- new_integer_type = true;
- }
- else
- new_integer_type = false;
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Marking ");
- print_generic_expr (dump_file, root->base, 0);
- fprintf (dump_file, " offset: %u, size: %u ",
- (unsigned) root->offset, (unsigned) root->size);
- fprintf (dump_file, " to be replaced%s.\n",
- new_integer_type ? " with an integer": "");
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Changing the type of a replacement for ");
+ print_generic_expr (dump_file, root->base, 0);
+ fprintf (dump_file, " offset: %u, size: %u ",
+ (unsigned) root->offset, (unsigned) root->size);
+ fprintf (dump_file, " to an integer.\n");
+ }
}
root->grp_to_be_replaced = 1;
+ root->replacement_decl = create_access_replacement (root);
sth_created = true;
hole = false;
}
@@ -2209,15 +2204,7 @@ analyze_access_subtree (struct access *root, struct access *parent,
if (MAY_HAVE_DEBUG_STMTS)
{
root->grp_to_be_debug_replaced = 1;
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Marking ");
- print_generic_expr (dump_file, root->base, 0);
- fprintf (dump_file, " offset: %u, size: %u ",
- (unsigned) root->offset, (unsigned) root->size);
- fprintf (dump_file, " to be replaced with debug "
- "statements.\n");
- }
+ root->replacement_decl = create_access_replacement (root);
}
}
@@ -2883,7 +2870,12 @@ load_assign_lhs_subreplacements (struct access *lacc, struct access *top_racc,
lacc->size);
if (racc && racc->grp_to_be_replaced)
- drhs = get_access_replacement (racc);
+ {
+ if (racc->grp_write)
+ drhs = get_access_replacement (racc);
+ else
+ drhs = NULL;
+ }
else if (*refreshed == SRA_UDH_LEFT)
drhs = build_debug_ref_for_model (loc, lacc->base, lacc->offset,
lacc);
@@ -2973,7 +2965,11 @@ sra_modify_constructor_assign (gimple *stmt, gimple_stmt_iterator *gsi)
static tree
get_repl_default_def_ssa_name (struct access *racc)
{
- return get_or_create_ssa_default_def (cfun, get_access_replacement (racc));
+ gcc_checking_assert (!racc->grp_to_be_replaced &&
+ !racc->grp_to_be_debug_replaced);
+ if (!racc->replacement_decl)
+ racc->replacement_decl = create_access_replacement (racc);
+ return get_or_create_ssa_default_def (cfun, racc->replacement_decl);
}
/* Return true if REF has a COMPONENT_REF with a bit-field field declaration
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 855c212b0ca..edcf92918b7 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -1772,6 +1772,29 @@ defcodefor_name (tree name, enum tree_code *code, tree *arg1, tree *arg2)
/* Ignore arg3 currently. */
}
+/* Return true if a conversion of an operand from type FROM to type TO
+ should be applied after performing the operation instead. */
+
+static bool
+hoist_conversion_for_bitop_p (tree to, tree from)
+{
+ /* That's a good idea if the conversion widens the operand, thus
+ after hoisting the conversion the operation will be narrower. */
+ if (TYPE_PRECISION (from) < TYPE_PRECISION (to))
+ return true;
+
+ /* It's also a good idea if the conversion is to a non-integer mode. */
+ if (GET_MODE_CLASS (TYPE_MODE (to)) != MODE_INT)
+ return true;
+
+ /* Or if the precision of TO is not the same as the precision
+ of its mode. */
+ if (TYPE_PRECISION (to) != GET_MODE_PRECISION (TYPE_MODE (to)))
+ return true;
+
+ return false;
+}
+
/* Simplify bitwise binary operations.
Return true if a transformation applied, otherwise return false. */
@@ -1789,9 +1812,11 @@ simplify_bitwise_binary (gimple_stmt_iterator *gsi)
defcodefor_name (arg1, &def1_code, &def1_arg1, &def1_arg2);
defcodefor_name (arg2, &def2_code, &def2_arg1, &def2_arg2);
- /* Try to fold (type) X op CST -> (type) (X op ((type-x) CST)). */
+ /* Try to fold (type) X op CST -> (type) (X op ((type-x) CST))
+ when profitable. */
if (TREE_CODE (arg2) == INTEGER_CST
&& CONVERT_EXPR_CODE_P (def1_code)
+ && hoist_conversion_for_bitop_p (TREE_TYPE (arg1), TREE_TYPE (def1_arg1))
&& INTEGRAL_TYPE_P (TREE_TYPE (def1_arg1))
&& int_fits_type_p (arg2, TREE_TYPE (def1_arg1)))
{
@@ -1816,15 +1841,7 @@ simplify_bitwise_binary (gimple_stmt_iterator *gsi)
if (CONVERT_EXPR_CODE_P (def1_code)
&& CONVERT_EXPR_CODE_P (def2_code)
&& types_compatible_p (TREE_TYPE (def1_arg1), TREE_TYPE (def2_arg1))
- /* Make sure that the conversion widens the operands, or has same
- precision, or that it changes the operation to a bitfield
- precision. */
- && ((TYPE_PRECISION (TREE_TYPE (def1_arg1))
- <= TYPE_PRECISION (TREE_TYPE (arg1)))
- || (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (arg1)))
- != MODE_INT)
- || (TYPE_PRECISION (TREE_TYPE (arg1))
- != GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (arg1))))))
+ && hoist_conversion_for_bitop_p (TREE_TYPE (arg1), TREE_TYPE (def1_arg1)))
{
gimple newop;
tree tem = make_ssa_name (TREE_TYPE (def1_arg1), NULL);
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 910715aaadd..4570807842d 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -207,7 +207,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop)
EDGE_TO_CANCEL (if non-NULL) is an non-exit edge eliminated in the last iteration
of loop.
Return results in SIZE, estimate benefits for complete unrolling exiting by EXIT.
- Stop estimating after UPPER_BOUND is met. Return true in this case */
+ Stop estimating after UPPER_BOUND is met. Return true in this case. */
static bool
tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, struct loop_size *size,
@@ -321,6 +321,7 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, stru
- size->last_iteration_eliminated_by_peeling) > upper_bound)
{
free (body);
+ path.release ();
return true;
}
}
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 7ba7416f37a..744fa71a95d 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3293,6 +3293,7 @@ maybe_lower_iteration_bound (struct loop *loop)
}
BITMAP_FREE (visited);
queue.release ();
+ pointer_set_destroy (not_executed_last_iteration);
}
/* Records estimates on numbers of iterations of LOOP. If USE_UNDEFINED_P
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index f4a27046123..edc04eaa014 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -70,10 +70,13 @@ tree_ssa_loop_init (void)
| LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
+ /* We might discover new loops, e.g. when turning irreducible
+ regions into reducible. */
+ scev_initialize ();
+
if (number_of_loops () <= 1)
return 0;
- scev_initialize ();
return 0;
}
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index a91ee379d69..e8f3ff7e730 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -229,6 +229,7 @@ find_control_equiv_block (basic_block bb)
#define MAX_NUM_CHAINS 8
#define MAX_CHAIN_LEN 5
+#define MAX_POSTDOM_CHECK 8
/* Computes the control dependence chains (paths of edges)
for DEP_BB up to the dominating basic block BB (the head node of a
@@ -269,6 +270,7 @@ compute_control_dep_chain (basic_block bb, basic_block dep_bb,
FOR_EACH_EDGE (e, ei, bb->succs)
{
basic_block cd_bb;
+ int post_dom_check = 0;
if (e->flags & (EDGE_FAKE | EDGE_ABNORMAL))
continue;
@@ -298,7 +300,8 @@ compute_control_dep_chain (basic_block bb, basic_block dep_bb,
}
cd_bb = find_pdom (cd_bb);
- if (cd_bb == EXIT_BLOCK_PTR)
+ post_dom_check++;
+ if (cd_bb == EXIT_BLOCK_PTR || post_dom_check > MAX_POSTDOM_CHECK)
break;
}
cur_cd_chain->pop ();
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index e08bcf89970..b0619faefd5 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -59,16 +59,13 @@ redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus)
slot = pointer_map_insert (edge_var_maps, e);
head = (edge_var_map_vector *) *slot;
if (!head)
- {
- head = new edge_var_map_vector;
- head->create (5);
- *slot = head;
- }
+ vec_safe_reserve (head, 5);
new_node.def = def;
new_node.result = result;
new_node.locus = locus;
- head->safe_push (new_node);
+ vec_safe_push (head, new_node);
+ *slot = head;
}
@@ -88,7 +85,7 @@ redirect_edge_var_map_clear (edge e)
if (slot)
{
head = (edge_var_map_vector *) *slot;
- delete head;
+ vec_free (head);
*slot = NULL;
}
}
@@ -115,11 +112,11 @@ redirect_edge_var_map_dup (edge newe, edge olde)
return;
head = (edge_var_map_vector *) *old_slot;
- edge_var_map_vector *new_head = new edge_var_map_vector;
+ edge_var_map_vector *new_head = NULL;
if (head)
- *new_head = head->copy ();
+ new_head = vec_safe_copy (head);
else
- new_head->create (5);
+ vec_safe_reserve (new_head, 5);
*new_slot = new_head;
}
@@ -151,7 +148,7 @@ free_var_map_entry (const void *key ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
edge_var_map_vector *head = (edge_var_map_vector *) *value;
- delete head;
+ vec_free (head);
return true;
}
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 74d8c3a41fa..fe009acac97 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -4218,7 +4218,9 @@ vect_permute_store_chain (vec<tree> dr_chain,
unsigned int j, nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned char *sel = XALLOCAVEC (unsigned char, nelt);
- *result_chain = dr_chain.copy ();
+ result_chain->quick_grow (length);
+ memcpy (result_chain->address (), dr_chain.address (),
+ length * sizeof (tree));
for (i = 0, n = nelt / 2; i < n; i++)
{
@@ -4259,7 +4261,8 @@ vect_permute_store_chain (vec<tree> dr_chain,
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
(*result_chain)[2*j+1] = low;
}
- dr_chain = result_chain->copy ();
+ memcpy (dr_chain.address (), result_chain->address (),
+ length * sizeof (tree));
}
}
@@ -4673,7 +4676,9 @@ vect_permute_load_chain (vec<tree> dr_chain,
unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned char *sel = XALLOCAVEC (unsigned char, nelt);
- *result_chain = dr_chain.copy ();
+ result_chain->quick_grow (length);
+ memcpy (result_chain->address (), dr_chain.address (),
+ length * sizeof (tree));
for (i = 0; i < nelt; ++i)
sel[i] = i * 2;
@@ -4708,7 +4713,8 @@ vect_permute_load_chain (vec<tree> dr_chain,
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
(*result_chain)[j/2+length/2] = data_ref;
}
- dr_chain = result_chain->copy ();
+ memcpy (dr_chain.address (), result_chain->address (),
+ length * sizeof (tree));
}
}
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 3693cd27a96..6f71016080e 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -5209,6 +5209,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
double_reduc, slp_node);
phis.release ();
+ vect_defs.release ();
vec_oprnds0.release ();
vec_oprnds1.release ();
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 36f81299d5c..873c18e74ed 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -2614,14 +2614,14 @@ vect_get_slp_vect_defs (slp_tree slp_node, vec<tree> *vec_oprnds)
void
vect_get_slp_defs (vec<tree> ops, slp_tree slp_node,
- vec<slp_void_p> *vec_oprnds, int reduc_index)
+ vec<vec<tree> > *vec_oprnds, int reduc_index)
{
gimple first_stmt;
int number_of_vects = 0, i;
unsigned int child_index = 0;
HOST_WIDE_INT lhs_size_unit, rhs_size_unit;
slp_tree child = NULL;
- vec<tree> *vec_defs;
+ vec<tree> vec_defs;
tree oprnd;
bool vectorized_defs;
@@ -2676,19 +2676,20 @@ vect_get_slp_defs (vec<tree> ops, slp_tree slp_node,
}
/* Allocate memory for vectorized defs. */
- vec_alloc (vec_defs, number_of_vects);
+ vec_defs = vNULL;
+ vec_defs.create (number_of_vects);
/* For reduction defs we call vect_get_constant_vectors (), since we are
looking for initial loop invariant values. */
if (vectorized_defs && reduc_index == -1)
/* The defs are already vectorized. */
- vect_get_slp_vect_defs (child, vec_defs);
+ vect_get_slp_vect_defs (child, &vec_defs);
else
/* Build vectors from scalar defs. */
- vect_get_constant_vectors (oprnd, slp_node, vec_defs, i,
+ vect_get_constant_vectors (oprnd, slp_node, &vec_defs, i,
number_of_vects, reduc_index);
- vec_oprnds->quick_push ((slp_void_p) vec_defs);
+ vec_oprnds->quick_push (vec_defs);
/* For reductions, we only need initial values. */
if (reduc_index != -1)
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 1712d950e60..1e492bda62d 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1583,7 +1583,7 @@ vect_get_vec_defs (tree op0, tree op1, gimple stmt,
int nops = (op1 == NULL_TREE) ? 1 : 2;
vec<tree> ops;
ops.create (nops);
- vec<slp_void_p> vec_defs;
+ vec<vec<tree> > vec_defs;
vec_defs.create (nops);
ops.quick_push (op0);
@@ -1592,9 +1592,9 @@ vect_get_vec_defs (tree op0, tree op1, gimple stmt,
vect_get_slp_defs (ops, slp_node, &vec_defs, reduc_index);
- *vec_oprnds0 = *((vec<tree> *) vec_defs[0]);
+ *vec_oprnds0 = vec_defs[0];
if (op1)
- *vec_oprnds1 = *((vec<tree> *) vec_defs[1]);
+ *vec_oprnds1 = vec_defs[1];
ops.release ();
vec_defs.release ();
@@ -1882,14 +1882,14 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (slp_node)
{
- vec<slp_void_p> vec_defs;
+ vec<vec<tree> > vec_defs;
vec_defs.create (nargs);
vec<tree> vec_oprnds0;
for (i = 0; i < nargs; i++)
vargs.quick_push (gimple_call_arg (stmt, i));
vect_get_slp_defs (vargs, slp_node, &vec_defs, -1);
- vec_oprnds0 = *((vec<tree> *) vec_defs[0]);
+ vec_oprnds0 = vec_defs[0];
/* Arguments are ready. Create the new vector stmt. */
FOR_EACH_VEC_ELT (vec_oprnds0, i, vec_oprnd0)
@@ -1897,7 +1897,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
size_t k;
for (k = 0; k < nargs; k++)
{
- vec<tree> vec_oprndsk = *((vec<tree> *) vec_defs[k]);
+ vec<tree> vec_oprndsk = vec_defs[k];
vargs[k] = vec_oprndsk[i];
}
new_stmt = gimple_build_call_vec (fndecl, vargs);
@@ -1909,7 +1909,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
for (i = 0; i < nargs; i++)
{
- vec<tree> vec_oprndsi = *((vec<tree> *) vec_defs[i]);
+ vec<tree> vec_oprndsi = vec_defs[i];
vec_oprndsi.release ();
}
vec_defs.release ();
@@ -1958,14 +1958,14 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (slp_node)
{
- vec<slp_void_p> vec_defs;
+ vec<vec<tree> > vec_defs;
vec_defs.create (nargs);
vec<tree> vec_oprnds0;
for (i = 0; i < nargs; i++)
vargs.quick_push (gimple_call_arg (stmt, i));
vect_get_slp_defs (vargs, slp_node, &vec_defs, -1);
- vec_oprnds0 = *((vec<tree> *) vec_defs[0]);
+ vec_oprnds0 = vec_defs[0];
/* Arguments are ready. Create the new vector stmt. */
for (i = 0; vec_oprnds0.iterate (i, &vec_oprnd0); i += 2)
@@ -1974,7 +1974,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
vargs.truncate (0);
for (k = 0; k < nargs; k++)
{
- vec<tree> vec_oprndsk = *((vec<tree> *) vec_defs[k]);
+ vec<tree> vec_oprndsk = vec_defs[k];
vargs.quick_push (vec_oprndsk[i]);
vargs.quick_push (vec_oprndsk[i + 1]);
}
@@ -1987,7 +1987,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
for (i = 0; i < nargs; i++)
{
- vec<tree> vec_oprndsi = *((vec<tree> *) vec_defs[i]);
+ vec<tree> vec_oprndsi = vec_defs[i];
vec_oprndsi.release ();
}
vec_defs.release ();
@@ -2269,7 +2269,7 @@ vect_create_vectorized_promotion_stmts (vec<tree> *vec_oprnds0,
vec_tmp.quick_push (new_tmp2);
}
- vec_oprnds0->truncate (0);
+ vec_oprnds0->release ();
*vec_oprnds0 = vec_tmp;
}
@@ -4151,7 +4151,8 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
new_stmt = NULL;
if (grouped_store)
{
- result_chain.create (group_size);
+ if (j == 0)
+ result_chain.create (group_size);
/* Permute. */
vect_permute_store_chain (dr_chain, group_size, stmt, gsi,
&result_chain);
@@ -5392,7 +5393,7 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi,
{
vec<tree> ops;
ops.create (4);
- vec<slp_void_p> vec_defs;
+ vec<vec<tree> > vec_defs;
vec_defs.create (4);
ops.safe_push (TREE_OPERAND (cond_expr, 0));
@@ -5400,10 +5401,10 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi,
ops.safe_push (then_clause);
ops.safe_push (else_clause);
vect_get_slp_defs (ops, slp_node, &vec_defs, -1);
- vec_oprnds3 = *((vec<tree> *) vec_defs.pop ());
- vec_oprnds2 = *((vec<tree> *) vec_defs.pop ());
- vec_oprnds1 = *((vec<tree> *) vec_defs.pop ());
- vec_oprnds0 = *((vec<tree> *) vec_defs.pop ());
+ vec_oprnds3 = vec_defs.pop ();
+ vec_oprnds2 = vec_defs.pop ();
+ vec_oprnds1 = vec_defs.pop ();
+ vec_oprnds0 = vec_defs.pop ();
ops.release ();
vec_defs.release ();
@@ -6071,7 +6072,8 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size)
/* We can't build a vector type of elements with alignment bigger than
their size. */
else if (nbytes < TYPE_ALIGN_UNIT (scalar_type))
- scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1);
+ scalar_type = lang_hooks.types.type_for_mode (inner_mode,
+ TYPE_UNSIGNED (scalar_type));
/* If we felt back to using the mode fail if there was
no scalar type for it. */
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 8d3a3def1f4..f2ec7135a9b 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -978,7 +978,7 @@ extern bool vect_analyze_slp (loop_vec_info, bb_vec_info);
extern bool vect_make_slp_decision (loop_vec_info);
extern void vect_detect_hybrid_slp (loop_vec_info);
extern void vect_get_slp_defs (vec<tree> , slp_tree,
- vec<slp_void_p> *, int);
+ vec<vec<tree> > *, int);
extern LOC find_bb_location (basic_block);
extern bb_vec_info vect_slp_analyze_bb (basic_block);
diff --git a/include/ChangeLog b/include/ChangeLog
index e071c48dfa7..03b4e63b89d 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-01 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2.h (enum dwarf_sect): New enum type.
+
2013-02-11 Sriraman Tallam <tmsriram@google.com>
* plugin-api.h (enum ld_plugin_level): Assign integers
diff --git a/include/dwarf2.h b/include/dwarf2.h
index e98505ac2f9..120e2c16b48 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -376,6 +376,20 @@ enum dwarf_macro_record_type
#define DW_EH_PE_indirect 0x80
+/* Codes for the debug sections in a dwarf package (.dwp) file.
+ Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFissionDWP. */
+enum dwarf_sect
+ {
+ DW_SECT_INFO = 1,
+ DW_SECT_TYPES = 2,
+ DW_SECT_ABBREV = 3,
+ DW_SECT_LINE = 4,
+ DW_SECT_LOC = 5,
+ DW_SECT_STR_OFFSETS = 6,
+ DW_SECT_MACINFO = 7,
+ DW_SECT_MACRO = 8,
+ DW_SECT_MAX = 8
+ };
#ifdef __cplusplus
extern "C" {
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 22451a2103f..3d8473dabb6 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,30 @@
+2013-03-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * files.c (_cpp_save_file_entries): Free result at the end.
+ * pch.c (cpp_string_free): New function.
+ (cpp_save_state): Use it in htab_create call.
+ (cpp_write_pch_deps): Free ss->defs. Destroy ss->definedhash.
+
+2013-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ * files.c (_cpp_find_file): If returning early, before storing
+ something to *hash_slot and *hash_slot is NULL, call htab_clear_slot
+ on it. Access *hash_slot using void * type rather than
+ struct file_hash_entry * to avoid aliasing issues.
+
+ * configure.ac: Don't define ENABLE_CHECKING whenever
+ --enable-checking is seen, instead use similar --enable-checking=yes
+ vs. --enable-checking=release default as gcc/ subdir has and
+ define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/.
+ Define ENABLE_VALGRIND_CHECKING if requested.
+ * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff
+ struct first in the allocated buffer and result->base after it.
+ (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself
+ instead of buff->base.
+ * config.in: Regenerated.
+ * configure: Regenerated.
+
2013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/55582
diff --git a/libcpp/config.in b/libcpp/config.in
index fca690cd306..1b0b25555cf 100644
--- a/libcpp/config.in
+++ b/libcpp/config.in
@@ -21,6 +21,10 @@
language is requested. */
#undef ENABLE_NLS
+/* Define if you want to workaround valgrind (a memory checker) warnings about
+ possible memory leaks because of libcpp use of interior pointers. */
+#undef ENABLE_VALGRIND_CHECKING
+
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
diff --git a/libcpp/configure b/libcpp/configure
index d07aed3199c..f21b361577f 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -1333,7 +1333,11 @@ Optional Features:
--enable-werror-always enable -Werror despite compiler version
--disable-rpath do not hardcode runtime library paths
--enable-maintainer-mode enable rules only needed by maintainers
- --enable-checking enable expensive run-time checks
+ --enable-checking[=LIST]
+ enable expensive run-time checks. With LIST, enable
+ only specific categories of checks. Categories are:
+ yes,no,all,none,release. Flags are: misc,valgrind or
+ other strings
--enable-canonical-system-headers
enable or disable system headers canonicalization
@@ -7083,20 +7087,54 @@ else
fi
+# Enable expensive internal checks
+is_release=
+if test -f $srcdir/../gcc/DEV-PHASE \
+ && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
+ is_release=yes
+fi
+
# Check whether --enable-checking was given.
if test "${enable_checking+set}" = set; then :
- enableval=$enable_checking;
+ enableval=$enable_checking; ac_checking_flags="${enableval}"
+else
+
+# Determine the default checks.
+if test x$is_release = x ; then
+ ac_checking_flags=yes
else
- enable_checking=no
+ ac_checking_flags=release
+fi
fi
+IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
+for check in release $ac_checking_flags
+do
+ case $check in
+ # these set all the flags to specific states
+ yes|all) ac_checking=1 ; ac_valgrind_checking= ;;
+ no|none|release) ac_checking= ; ac_valgrind_checking= ;;
+ # these enable particular checks
+ misc) ac_checking=1 ;;
+ valgrind) ac_valgrind_checking=1 ;;
+ # accept
+ *) ;;
+ esac
+done
+IFS="$ac_save_IFS"
-if test $enable_checking != no ; then
+if test x$ac_checking != x ; then
$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
fi
+if test x$ac_valgrind_checking != x ; then
+
+$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
+
+fi
+
# Check whether --enable-canonical-system-headers was given.
if test "${enable_canonical_system_headers+set}" = set; then :
enableval=$enable_canonical_system_headers;
diff --git a/libcpp/configure.ac b/libcpp/configure.ac
index 34ae5c20622..e0c4ae6958f 100644
--- a/libcpp/configure.ac
+++ b/libcpp/configure.ac
@@ -123,15 +123,53 @@ else
fi
AC_SUBST(MAINT)
-AC_ARG_ENABLE(checking,
-[ --enable-checking enable expensive run-time checks],,
-enable_checking=no)
+# Enable expensive internal checks
+is_release=
+if test -f $srcdir/../gcc/DEV-PHASE \
+ && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
+ is_release=yes
+fi
-if test $enable_checking != no ; then
+AC_ARG_ENABLE(checking,
+[AS_HELP_STRING([[--enable-checking[=LIST]]],
+ [enable expensive run-time checks. With LIST,
+ enable only specific categories of checks.
+ Categories are: yes,no,all,none,release.
+ Flags are: misc,valgrind or other strings])],
+[ac_checking_flags="${enableval}"],[
+# Determine the default checks.
+if test x$is_release = x ; then
+ ac_checking_flags=yes
+else
+ ac_checking_flags=release
+fi])
+IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
+for check in release $ac_checking_flags
+do
+ case $check in
+ # these set all the flags to specific states
+ yes|all) ac_checking=1 ; ac_valgrind_checking= ;;
+ no|none|release) ac_checking= ; ac_valgrind_checking= ;;
+ # these enable particular checks
+ misc) ac_checking=1 ;;
+ valgrind) ac_valgrind_checking=1 ;;
+ # accept
+ *) ;;
+ esac
+done
+IFS="$ac_save_IFS"
+
+if test x$ac_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1,
[Define if you want more run-time sanity checks.])
fi
+if test x$ac_valgrind_checking != x ; then
+ AC_DEFINE(ENABLE_VALGRIND_CHECKING, 1,
+[Define if you want to workaround valgrind (a memory checker) warnings about
+ possible memory leaks because of libcpp use of interior pointers.])
+fi
+
AC_ARG_ENABLE(canonical-system-headers,
[ --enable-canonical-system-headers
enable or disable system headers canonicalization],
diff --git a/libcpp/files.c b/libcpp/files.c
index 105cd969748..dae5526997f 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -492,7 +492,8 @@ _cpp_file *
_cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
bool fake, int angle_brackets, bool implicit_preinclude)
{
- struct file_hash_entry *entry, **hash_slot;
+ struct file_hash_entry *entry;
+ void **hash_slot;
_cpp_file *file;
bool invalid_pch = false;
bool saw_bracket_include = false;
@@ -503,13 +504,12 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
if (start_dir == NULL)
cpp_error (pfile, CPP_DL_ICE, "NULL directory in find_file");
- hash_slot = (struct file_hash_entry **)
- htab_find_slot_with_hash (pfile->file_hash, fname,
- htab_hash_string (fname),
- INSERT);
+ hash_slot
+ = htab_find_slot_with_hash (pfile->file_hash, fname,
+ htab_hash_string (fname), INSERT);
/* First check the cache before we resort to memory allocation. */
- entry = search_cache (*hash_slot, start_dir);
+ entry = search_cache ((struct file_hash_entry *) *hash_slot, start_dir);
if (entry)
return entry->u.file;
@@ -533,6 +533,17 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
the list of all files so that #import works. */
file->next_file = pfile->all_files;
pfile->all_files = file;
+ if (*hash_slot == NULL)
+ {
+ /* If *hash_slot is NULL, the above htab_find_slot_with_hash
+ call just created the slot, but we aren't going to store
+ there anything, so need to remove the newly created entry.
+ htab_clear_slot requires that it is non-NULL, so store
+ there some non-NULL pointer, htab_clear_slot will
+ overwrite it immediately. */
+ *hash_slot = file;
+ htab_clear_slot (pfile->file_hash, hash_slot);
+ }
return file;
}
@@ -548,6 +559,12 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
{
free ((char *) file->name);
free (file);
+ if (*hash_slot == NULL)
+ {
+ /* See comment on the above htab_clear_slot call. */
+ *hash_slot = file;
+ htab_clear_slot (pfile->file_hash, hash_slot);
+ }
return NULL;
}
else
@@ -565,7 +582,7 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
else
continue;
- entry = search_cache (*hash_slot, file->dir);
+ entry = search_cache ((struct file_hash_entry *) *hash_slot, file->dir);
if (entry)
{
found_in_cache = file->dir;
@@ -589,11 +606,11 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
/* Store this new result in the hash table. */
entry = new_file_hash_entry (pfile);
- entry->next = *hash_slot;
+ entry->next = (struct file_hash_entry *) *hash_slot;
entry->start_dir = start_dir;
entry->location = pfile->line_table->highest_location;
entry->u.file = file;
- *hash_slot = entry;
+ *hash_slot = (void *) entry;
/* If we passed the quote or bracket chain heads, cache them also.
This speeds up processing if there are lots of -I options. */
@@ -602,22 +619,22 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
&& found_in_cache != pfile->bracket_include)
{
entry = new_file_hash_entry (pfile);
- entry->next = *hash_slot;
+ entry->next = (struct file_hash_entry *) *hash_slot;
entry->start_dir = pfile->bracket_include;
entry->location = pfile->line_table->highest_location;
entry->u.file = file;
- *hash_slot = entry;
+ *hash_slot = (void *) entry;
}
if (saw_quote_include
&& pfile->quote_include != start_dir
&& found_in_cache != pfile->quote_include)
{
entry = new_file_hash_entry (pfile);
- entry->next = *hash_slot;
+ entry->next = (struct file_hash_entry *) *hash_slot;
entry->start_dir = pfile->quote_include;
entry->location = pfile->line_table->highest_location;
entry->u.file = file;
- *hash_slot = entry;
+ *hash_slot = (void *) entry;
}
return file;
@@ -1754,6 +1771,7 @@ _cpp_save_file_entries (cpp_reader *pfile, FILE *fp)
struct pchf_data *result;
size_t result_size;
_cpp_file *f;
+ bool ret;
for (f = pfile->all_files; f; f = f->next_file)
++count;
@@ -1810,7 +1828,9 @@ _cpp_save_file_entries (cpp_reader *pfile, FILE *fp)
qsort (result->entries, result->count, sizeof (struct pchf_entry),
pchf_save_compare);
- return fwrite (result, result_size, 1, fp) == 1;
+ ret = fwrite (result, result_size, 1, fp) == 1;
+ free (result);
+ return ret;
}
/* Read the pchf_data structure from F. */
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 976d9e8b0eb..570c00733cb 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -2846,8 +2846,17 @@ new_buff (size_t len)
len = MIN_BUFF_SIZE;
len = CPP_ALIGN (len);
+#ifdef ENABLE_VALGRIND_CHECKING
+ /* Valgrind warns about uses of interior pointers, so put _cpp_buff
+ struct first. */
+ size_t slen = CPP_ALIGN2 (sizeof (_cpp_buff), 2 * DEFAULT_ALIGNMENT);
+ base = XNEWVEC (unsigned char, len + slen);
+ result = (_cpp_buff *) base;
+ base += slen;
+#else
base = XNEWVEC (unsigned char, len + sizeof (_cpp_buff));
result = (_cpp_buff *) (base + len);
+#endif
result->base = base;
result->cur = base;
result->limit = base + len;
@@ -2934,7 +2943,11 @@ _cpp_free_buff (_cpp_buff *buff)
for (; buff; buff = next)
{
next = buff->next;
+#ifdef ENABLE_VALGRIND_CHECKING
+ free (buff);
+#else
free (buff->base);
+#endif
}
}
diff --git a/libcpp/pch.c b/libcpp/pch.c
index 94e5d21ab7a..6270bda53ed 100644
--- a/libcpp/pch.c
+++ b/libcpp/pch.c
@@ -187,6 +187,16 @@ cpp_string_eq (const void *a_p, const void *b_p)
&& memcmp (a->text, b->text, a->len) == 0);
}
+/* Free memory associated with cpp_string. */
+
+static void
+cpp_string_free (void *a_p)
+{
+ struct cpp_string *a = (struct cpp_string *) a_p;
+ free ((void *) a->text);
+ free (a);
+}
+
/* Save the current definitions of the cpp_reader for dependency
checking purposes. When writing a precompiled header, this should
be called at the same point in the compilation as cpp_valid_state
@@ -198,7 +208,7 @@ cpp_save_state (cpp_reader *r, FILE *f)
/* Save the list of non-void identifiers for the dependency checking. */
r->savedstate = XNEW (struct cpp_savedstate);
r->savedstate->definedhash = htab_create (100, cpp_string_hash,
- cpp_string_eq, NULL);
+ cpp_string_eq, cpp_string_free);
cpp_forall_identifiers (r, save_idents, r->savedstate);
/* Write out the list of defined identifiers. */
@@ -336,6 +346,8 @@ cpp_write_pch_deps (cpp_reader *r, FILE *f)
return -1;
}
free (ss->definedstrs);
+ free (ss->defs);
+ htab_delete (ss->definedhash);
/* Free the saved state. */
free (ss);
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 6032f6f1a6a..5f16e40bc60 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,27 @@
+2013-03-01 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/sync-cache.c
+ (__aarch64_sync_cache_range): Silence warnings.
+
+2013-02-25 Catherine Moore <clm@codesourcery.com>
+
+ Revert:
+ 2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Chao-ying Fu <fu@mips.com>
+
+ * config/mips/mips16.S: Don't build for microMIPS.
+ * config/mips/linux-unwind.h: Handle microMIPS frame.
+ * config/mips/crtn.S (fini, init): New labels.
+
+2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Chao-ying Fu <fu@mips.com>
+
+ * config/mips/mips16.S: Don't build for microMIPS.
+ * config/mips/linux-unwind.h: Handle microMIPS frame.
+ * config/mips/crtn.S (fini, init): New labels.
+
2012-02-19 Edgar E. Iglesias <edgar.iglesias@gmail.com>
* config/microblaze/modsi3.S (modsi3): Fix case with 0x80000000
as dividend.
diff --git a/libgcc/config/aarch64/sync-cache.c b/libgcc/config/aarch64/sync-cache.c
index 7091c489d32..3397e9d29b4 100644
--- a/libgcc/config/aarch64/sync-cache.c
+++ b/libgcc/config/aarch64/sync-cache.c
@@ -18,6 +18,8 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+void __aarch64_sync_cache_range (const void *, const void *);
+
void
__aarch64_sync_cache_range (const void *base, const void *end)
{
@@ -43,7 +45,7 @@ __aarch64_sync_cache_range (const void *base, const void *end)
address = (const char*) ((__UINTPTR_TYPE__) base
& ~ (__UINTPTR_TYPE__) (dcache_lsize - 1));
- for (address; address < (const char *) end; address += dcache_lsize)
+ for (; address < (const char *) end; address += dcache_lsize)
asm volatile ("dc\tcvau, %0"
:
: "r" (address)
@@ -55,7 +57,7 @@ __aarch64_sync_cache_range (const void *base, const void *end)
address = (const char*) ((__UINTPTR_TYPE__) base
& ~ (__UINTPTR_TYPE__) (icache_lsize - 1));
- for (address; address < (const char *) end; address += icache_lsize)
+ for (; address < (const char *) end; address += icache_lsize)
asm volatile ("ic\tivau, %0"
:
: "r" (address)
diff --git a/libgo/go/testing/quick/quick_test.go b/libgo/go/testing/quick/quick_test.go
index a6cf0dc3968..a178ec28e69 100644
--- a/libgo/go/testing/quick/quick_test.go
+++ b/libgo/go/testing/quick/quick_test.go
@@ -7,6 +7,7 @@ package quick
import (
"math/rand"
"reflect"
+ "runtime"
"testing"
)
@@ -72,8 +73,10 @@ func TestCheckEqual(t *testing.T) {
reportError("fBool", CheckEqual(fBool, fBool, nil), t)
reportError("fFloat32", CheckEqual(fFloat32, fFloat32, nil), t)
reportError("fFloat64", CheckEqual(fFloat64, fFloat64, nil), t)
- reportError("fComplex64", CheckEqual(fComplex64, fComplex64, nil), t)
- reportError("fComplex128", CheckEqual(fComplex128, fComplex128, nil), t)
+ if runtime.GOARCH != "alpha" {
+ reportError("fComplex64", CheckEqual(fComplex64, fComplex64, nil), t)
+ reportError("fComplex128", CheckEqual(fComplex128, fComplex128, nil), t)
+ }
reportError("fInt16", CheckEqual(fInt16, fInt16, nil), t)
reportError("fInt32", CheckEqual(fInt32, fInt32, nil), t)
reportError("fInt64", CheckEqual(fInt64, fInt64, nil), t)
diff --git a/libgo/runtime/go-reflect-call.c b/libgo/runtime/go-reflect-call.c
index 06edae45026..a66f92868f8 100644
--- a/libgo/runtime/go-reflect-call.c
+++ b/libgo/runtime/go-reflect-call.c
@@ -30,7 +30,7 @@ static ffi_type *go_struct_to_ffi (const struct __go_struct_type *)
static ffi_type *go_string_to_ffi (void) __attribute__ ((no_split_stack));
static ffi_type *go_interface_to_ffi (void) __attribute__ ((no_split_stack));
static ffi_type *go_complex_to_ffi (ffi_type *)
- __attribute__ ((no_split_stack));
+ __attribute__ ((no_split_stack, unused));
static ffi_type *go_type_to_ffi (const struct __go_type_descriptor *)
__attribute__ ((no_split_stack));
static ffi_type *go_func_return_ffi (const struct __go_func_type *)
@@ -185,13 +185,23 @@ go_type_to_ffi (const struct __go_type_descriptor *descriptor)
return &ffi_type_double;
abort ();
case GO_COMPLEX64:
+#ifdef __alpha__
+ runtime_throw("the libffi library does not support Complex64 type with "
+ "reflect.Call or runtime.SetFinalizer");
+#else
if (sizeof (float) == 4)
return go_complex_to_ffi (&ffi_type_float);
abort ();
+#endif
case GO_COMPLEX128:
+#ifdef __alpha__
+ runtime_throw("the libffi library does not support Complex128 type with "
+ "reflect.Call or runtime.SetFinalizer");
+#else
if (sizeof (double) == 8)
return go_complex_to_ffi (&ffi_type_double);
abort ();
+#endif
case GO_INT16:
return &ffi_type_sint16;
case GO_INT32:
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index b59f4acf0dc..9b563a50946 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -1256,6 +1256,12 @@ runtime_newm(void)
// Block signals during pthread_create so that the new thread
// starts with signals disabled. It will enable them in minit.
sigfillset(&clear);
+
+#ifdef SIGTRAP
+ // Blocking SIGTRAP reportedly breaks gdb on Alpha GNU/Linux.
+ sigdelset(&clear, SIGTRAP);
+#endif
+
sigemptyset(&old);
sigprocmask(SIG_BLOCK, &clear, &old);
ret = pthread_create(&tid, &attr, runtime_mstart, mp);
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 7935ad69f44..b4c61807b5e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-01 Andreas Schwab <schwab@linux-m68k.org>
+
+ * obstacks.texi (Obstacks): Trim @node to only contain the
+ node name.
+ * libiberty.texi (Obstacks): Lower section.
+
2013-02-14 Jason Merrill <jason@redhat.com>
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_DEFAULT_ARG.
diff --git a/libiberty/libiberty.texi b/libiberty/libiberty.texi
index 74f70d2bd5a..f1e4bddaa84 100644
--- a/libiberty/libiberty.texi
+++ b/libiberty/libiberty.texi
@@ -82,8 +82,6 @@ License; for more information, see @ref{Library Copying}.
* Functions:: Available functions, macros, and global variables.
-* Obstacks:: Object Stacks.
-
* Licenses:: The various licenses under which libiberty sources are
distributed.
@@ -245,7 +243,11 @@ central location from which to use, maintain, and distribute them.
@c This is generated from the glibc manual using a make-obstacks-texi.sh
@c script of Phil's. Hope it's accurate.
+@lowersections
+@lowersections
@include obstacks.texi
+@raisesections
+@raisesections
@node Functions
@chapter Function, Variable, and Macro Listing.
diff --git a/libiberty/obstacks.texi b/libiberty/obstacks.texi
index a1b1b478c38..67780aa1a65 100644
--- a/libiberty/obstacks.texi
+++ b/libiberty/obstacks.texi
@@ -1,4 +1,4 @@
-@node Obstacks,Licenses,Functions,Top
+@node Obstacks
@chapter Obstacks
@cindex obstacks
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 608ffab0851..4e3facc1a8e 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ * asan/asan_mapping.h (kMidMemEnd): Increase to 0x4fffffffffULL.
+ * asan/asan_rtl.cc (__asan_init): Increase kMidMemEnd to
+ 0x4fffffffffULL.
+
2013-02-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/56393
diff --git a/libsanitizer/asan/asan_mapping.h b/libsanitizer/asan/asan_mapping.h
index df952363893..9b4dd35f1eb 100644
--- a/libsanitizer/asan/asan_mapping.h
+++ b/libsanitizer/asan/asan_mapping.h
@@ -30,13 +30,13 @@
// || `[0x000000040000, 0x01ffffffffff]` || ShadowGap ||
//
// Special case when something is already mapped between
-// 0x003000000000 and 0x004000000000 (e.g. when prelink is installed):
+// 0x003000000000 and 0x005000000000 (e.g. when prelink is installed):
// || `[0x10007fff8000, 0x7fffffffffff]` || HighMem ||
// || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
-// || `[0x004000000000, 0x02008fff6fff]` || ShadowGap3 ||
-// || `[0x003000000000, 0x003fffffffff]` || MidMem ||
-// || `[0x00087fff8000, 0x002fffffffff]` || ShadowGap2 ||
-// || `[0x00067fff8000, 0x00087fff7fff]` || MidShadow ||
+// || `[0x005000000000, 0x02008fff6fff]` || ShadowGap3 ||
+// || `[0x003000000000, 0x004fffffffff]` || MidMem ||
+// || `[0x000a7fff8000, 0x002fffffffff]` || ShadowGap2 ||
+// || `[0x00067fff8000, 0x000a7fff7fff]` || MidShadow ||
// || `[0x00008fff7000, 0x00067fff7fff]` || ShadowGap ||
// || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow ||
// || `[0x000000000000, 0x00007fff7fff]` || LowMem ||
@@ -129,7 +129,7 @@ extern uptr AsanMappingProfile[];
// difference between fixed and non-fixed mapping is below the noise level.
static uptr kHighMemEnd = 0x7fffffffffffULL;
static uptr kMidMemBeg = 0x3000000000ULL;
-static uptr kMidMemEnd = 0x3fffffffffULL;
+static uptr kMidMemEnd = 0x4fffffffffULL;
#else
SANITIZER_INTERFACE_ATTRIBUTE
extern uptr kHighMemEnd, kMidMemBeg, kMidMemEnd; // Initialized in __asan_init.
diff --git a/libsanitizer/asan/asan_rtl.cc b/libsanitizer/asan/asan_rtl.cc
index e551b6fbc26..6ddb01329ad 100644
--- a/libsanitizer/asan/asan_rtl.cc
+++ b/libsanitizer/asan/asan_rtl.cc
@@ -455,7 +455,7 @@ void __asan_init() {
#if ASAN_LINUX && defined(__x86_64__) && !ASAN_FIXED_MAPPING
if (!full_shadow_is_available) {
kMidMemBeg = kLowMemEnd < 0x3000000000ULL ? 0x3000000000ULL : 0;
- kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x3fffffffffULL : 0;
+ kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x4fffffffffULL : 0;
}
#endif
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8e4d68f77b5..cbba5e21e29 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,67 @@
+2013-03-02 Ulrich Drepper <drepper@gmail.com>
+
+ Add triangular and von Mises distributions.
+ * include/ext/random: Include <ext/cmath>.
+ Add __gnu_cxx::triangular_distribution<> and
+ __gnu_cxx::von_mises_distribution<> classes.
+ * include/ext/random.tcc: Add out-of-line functions for
+ __gnu_cxx::triangular_distribution<> and
+ __gnu_cxx::von_mises_distribution<>.
+ * testsuite/ext/triangular_distribution/cons/default.cc: New file.
+ * testsuite/ext/triangular_distribution/cons/parms.cc: New file.
+ * testsuite/ext/triangular_distribution/operators/serialize.cc:
+ New file.
+ * testsuite/ext/triangular_distribution/operators/equal.cc:
+ New file.
+ * testsuite/ext/triangular_distribution/operators/inequal.cc:
+ New file.
+ * testsuite/ext/triangular_distribution/requirements/typedefs.cc:
+ New file.
+ * testsuite/ext/triangular_distribution/requirements/
+ explicit_instantiation/1.cc: New file.
+ * testsuite/ext/von_mises_distribution/cons/default.cc: New file.
+ * testsuite/ext/von_mises_distribution/cons/parms.cc: New file.
+ * testsuite/ext/von_mises_distribution/operators/serialize.cc:
+ New file.
+ * testsuite/ext/von_mises_distribution/operators/equal.cc: New file.
+ * testsuite/ext/von_mises_distribution/operators/inequal.cc:
+ New file.
+ * testsuite/ext/von_mises_distribution/requirements/typedefs.cc:
+ New file.
+ * testsuite/ext/von_mises_distribution/requirements/
+ explicit_instantiation/1.cc: New file.
+
+ Add math constants.
+ * include/Makefile.am (ext_headers): Add cmath.
+ * include/Makefile.in: Regenerated.
+ * include/ext/cmath: New file.
+
+2013-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * config/abi/post/solaris2.9/baseline_symbols.txt: Regenerate.
+ * config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt: Likewise.
+ * config/abi/post/solaris2.10/baseline_symbols.txt: Likewise.
+ * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
+ * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
+
+2013-02-26 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/56012
+ * include/bits/atomic_base.h (atomic_flag): Fix narrowing conversion.
+ * testsuite/29_atomics/atomic/operators/56012.cc: New.
+
+ PR libstdc++/56011
+ * include/std/atomic (atomic<bool>::operator=(bool) volatile): Add
+ missing overload.
+ * testsuite/29_atomics/atomic/operators/56011.cc: New.
+
+2013-02-25 Jason Merrill <jason@redhat.com>
+
+ * configure.ac: Check for __cxa_thread_atexit_impl.
+ * libsupc++/atexit_thread.cc (__cxa_thread_atexit): Just forward
+ to it if available.
+ * config.h.in, configure: Regenerate.
+
2013-02-20 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/streambuf (basic_streambuf): Use injected class name
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 061eac23df1..768aa7d930a 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1739,7 +1739,12 @@ AC_DEFUN([GLIBCXX_CHECK_RANDOM_TR1], [
AC_MSG_CHECKING([for "/dev/random" and "/dev/urandom" for TR1 random_device])
AC_CACHE_VAL(glibcxx_cv_random_tr1, [
if test -r /dev/random && test -r /dev/urandom; then
- glibcxx_cv_random_tr1=yes;
+ ## For MSys environment the test above is detect as false-positive
+ ## on mingw-targets. So disable it explicit for them.
+ case ${target_os} in
+ *mingw*) glibcxx_cv_random_tr1=no ;;
+ *) glibcxx_cv_random_tr1=yes ;;
+ esac
else
glibcxx_cv_random_tr1=no;
fi
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 0fde4733b87..22a5d378036 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -658,6 +658,9 @@
/* Define to 1 if you have the `_tanl' function. */
#undef HAVE__TANL
+/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
+#undef HAVE___CXA_THREAD_ATEXIT_IMPL
+
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
diff --git a/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt
index d7f3613bbc3..5072849bb55 100644
--- a/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt
@@ -388,6 +388,7 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE5pbaseEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
@@ -575,6 +576,8 @@ FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm@@GLIBCXX_3.4.18
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm@@GLIBCXX_3.4.18
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
@@ -1178,6 +1181,7 @@ FUNC:_ZNSt11range_errorD2Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILl1ELl1EEEENS1_IlS2_ILl1ELl1000000000EEEE@@GLIBCXX_3.4.18
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
@@ -1454,6 +1458,11 @@ FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEs@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
@@ -2430,6 +2439,7 @@ FUNC:__cxa_guard_acquire@@CXXABI_1.3
FUNC:__cxa_guard_release@@CXXABI_1.3
FUNC:__cxa_pure_virtual@@CXXABI_1.3
FUNC:__cxa_rethrow@@CXXABI_1.3
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
FUNC:__cxa_throw@@CXXABI_1.3
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
FUNC:__cxa_vec_cctor@@CXXABI_1.3
@@ -2454,6 +2464,7 @@ OBJECT:0:CXXABI_1.3.3
OBJECT:0:CXXABI_1.3.4
OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6
+OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
@@ -2465,6 +2476,7 @@ OBJECT:0:GLIBCXX_3.4.14
OBJECT:0:GLIBCXX_3.4.15
OBJECT:0:GLIBCXX_3.4.16
OBJECT:0:GLIBCXX_3.4.17
+OBJECT:0:GLIBCXX_3.4.18
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
diff --git a/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt
index d2356ba65ec..3874be08f07 100644
--- a/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt
@@ -388,6 +388,7 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE5pbaseEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
@@ -575,6 +576,8 @@ FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
@@ -1178,6 +1181,7 @@ FUNC:_ZNSt11range_errorD2Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
@@ -1454,6 +1458,11 @@ FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEs@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
@@ -2430,6 +2439,7 @@ FUNC:__cxa_guard_acquire@@CXXABI_1.3
FUNC:__cxa_guard_release@@CXXABI_1.3
FUNC:__cxa_pure_virtual@@CXXABI_1.3
FUNC:__cxa_rethrow@@CXXABI_1.3
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
FUNC:__cxa_throw@@CXXABI_1.3
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
FUNC:__cxa_vec_cctor@@CXXABI_1.3
@@ -2454,6 +2464,7 @@ OBJECT:0:CXXABI_1.3.3
OBJECT:0:CXXABI_1.3.4
OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6
+OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
@@ -2465,6 +2476,7 @@ OBJECT:0:GLIBCXX_3.4.14
OBJECT:0:GLIBCXX_3.4.15
OBJECT:0:GLIBCXX_3.4.16
OBJECT:0:GLIBCXX_3.4.17
+OBJECT:0:GLIBCXX_3.4.18
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
diff --git a/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt
index 912ce2527a9..3d3efcbaea9 100644
--- a/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt
@@ -388,6 +388,7 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE5pbaseEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
@@ -575,6 +576,8 @@ FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm@@GLIBCXX_3.4.18
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm@@GLIBCXX_3.4.18
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
@@ -1178,6 +1181,7 @@ FUNC:_ZNSt11range_errorD2Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILl1ELl1EEEENS1_IlS2_ILl1ELl1000000000EEEE@@GLIBCXX_3.4.18
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
@@ -1454,6 +1458,11 @@ FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEs@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
@@ -2430,6 +2439,7 @@ FUNC:__cxa_guard_acquire@@CXXABI_1.3
FUNC:__cxa_guard_release@@CXXABI_1.3
FUNC:__cxa_pure_virtual@@CXXABI_1.3
FUNC:__cxa_rethrow@@CXXABI_1.3
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
FUNC:__cxa_throw@@CXXABI_1.3
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
FUNC:__cxa_vec_cctor@@CXXABI_1.3
@@ -2454,6 +2464,7 @@ OBJECT:0:CXXABI_1.3.3
OBJECT:0:CXXABI_1.3.4
OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6
+OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
@@ -2465,6 +2476,7 @@ OBJECT:0:GLIBCXX_3.4.14
OBJECT:0:GLIBCXX_3.4.15
OBJECT:0:GLIBCXX_3.4.16
OBJECT:0:GLIBCXX_3.4.17
+OBJECT:0:GLIBCXX_3.4.18
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
diff --git a/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt
index 143f0f4d73c..05fe095d63e 100644
--- a/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt
@@ -387,6 +387,7 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE5pbaseEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
@@ -574,6 +575,8 @@ FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
@@ -1442,6 +1445,11 @@ FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEs@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
@@ -2403,6 +2411,7 @@ FUNC:__cxa_guard_acquire@@CXXABI_1.3
FUNC:__cxa_guard_release@@CXXABI_1.3
FUNC:__cxa_pure_virtual@@CXXABI_1.3
FUNC:__cxa_rethrow@@CXXABI_1.3
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
FUNC:__cxa_throw@@CXXABI_1.3
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
FUNC:__cxa_vec_cctor@@CXXABI_1.3
@@ -2469,6 +2478,7 @@ OBJECT:0:CXXABI_1.3.3
OBJECT:0:CXXABI_1.3.4
OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6
+OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
@@ -2480,6 +2490,7 @@ OBJECT:0:GLIBCXX_3.4.14
OBJECT:0:GLIBCXX_3.4.15
OBJECT:0:GLIBCXX_3.4.16
OBJECT:0:GLIBCXX_3.4.17
+OBJECT:0:GLIBCXX_3.4.18
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
diff --git a/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt
index 353d5374119..3183063f84d 100644
--- a/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt
@@ -387,6 +387,7 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE5pbaseEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
@@ -574,6 +575,8 @@ FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm@@GLIBCXX_3.4.18
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm@@GLIBCXX_3.4.18
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
@@ -1442,6 +1445,11 @@ FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEs@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
@@ -2403,6 +2411,7 @@ FUNC:__cxa_guard_acquire@@CXXABI_1.3
FUNC:__cxa_guard_release@@CXXABI_1.3
FUNC:__cxa_pure_virtual@@CXXABI_1.3
FUNC:__cxa_rethrow@@CXXABI_1.3
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
FUNC:__cxa_throw@@CXXABI_1.3
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
FUNC:__cxa_vec_cctor@@CXXABI_1.3
@@ -2469,6 +2478,7 @@ OBJECT:0:CXXABI_1.3.3
OBJECT:0:CXXABI_1.3.4
OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6
+OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
@@ -2480,6 +2490,7 @@ OBJECT:0:GLIBCXX_3.4.14
OBJECT:0:GLIBCXX_3.4.15
OBJECT:0:GLIBCXX_3.4.16
OBJECT:0:GLIBCXX_3.4.17
+OBJECT:0:GLIBCXX_3.4.18
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index e731e800737..0cfa4f8f60e 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -3530,11 +3530,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -26488,7 +26488,12 @@ $as_echo_n "checking for \"/dev/random\" and \"/dev/urandom\" for TR1 random_dev
else
if test -r /dev/random && test -r /dev/urandom; then
- glibcxx_cv_random_tr1=yes;
+ ## For MSys environment the test above is detect as false-positive
+ ## on mingw-targets. So disable it explicit for them.
+ case ${target_os} in
+ *mingw*) glibcxx_cv_random_tr1=no ;;
+ *) glibcxx_cv_random_tr1=yes ;;
+ esac
else
glibcxx_cv_random_tr1=no;
fi
@@ -26716,6 +26721,18 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
fi
+ for ac_func in __cxa_thread_atexit_impl
+do :
+ ac_fn_c_check_func "$LINENO" "__cxa_thread_atexit_impl" "ac_cv_func___cxa_thread_atexit_impl"
+if test "x$ac_cv_func___cxa_thread_atexit_impl" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___CXA_THREAD_ATEXIT_IMPL 1
+_ACEOF
+
+fi
+done
+
+
# For iconv support.
if test "X$prefix" = "XNONE"; then
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 66164a22628..a64fee28c2c 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -235,6 +235,8 @@ if $GLIBCXX_IS_NATIVE; then
# For TLS support.
GCC_CHECK_TLS
+ AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
+
# For iconv support.
AM_ICONV
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index af125a79101..30dabbe5209 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -499,6 +499,7 @@ ext_headers = \
${ext_srcdir}/array_allocator.h \
${ext_srcdir}/bitmap_allocator.h \
${ext_srcdir}/cast.h \
+ ${ext_srcdir}/cmath \
${ext_srcdir}/codecvt_specializations.h \
${ext_srcdir}/concurrence.h \
${ext_srcdir}/debug_allocator.h \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 3c1cee8b9e9..08f550a4ee9 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -67,6 +84,11 @@ CONFIG_CLEAN_VPATH_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
@@ -759,6 +781,7 @@ ext_headers = \
${ext_srcdir}/array_allocator.h \
${ext_srcdir}/bitmap_allocator.h \
${ext_srcdir}/cast.h \
+ ${ext_srcdir}/cmath \
${ext_srcdir}/codecvt_specializations.h \
${ext_srcdir}/concurrence.h \
${ext_srcdir}/debug_allocator.h \
@@ -1191,6 +1214,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/fragment.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1226,10 +1250,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index b44e99071af..609fe8b0623 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -239,6 +239,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
struct atomic<_Tp*>;
+ /* The target's "set" value for test-and-set may not be exactly 1. */
+#if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1
+ typedef bool __atomic_flag_data_type;
+#else
+ typedef unsigned char __atomic_flag_data_type;
+#endif
/**
* @brief Base type for atomic_flag.
@@ -254,12 +260,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __atomic_flag_base
{
- /* The target's "set" value for test-and-set may not be exactly 1. */
-#if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1
- bool _M_i;
-#else
- unsigned char _M_i;
-#endif
+ __atomic_flag_data_type _M_i;
};
_GLIBCXX_END_EXTERN_C
@@ -277,7 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Conversion to ATOMIC_FLAG_INIT.
constexpr atomic_flag(bool __i) noexcept
- : __atomic_flag_base({ __i ? __GCC_ATOMIC_TEST_AND_SET_TRUEVAL : 0 })
+ : __atomic_flag_base{ _S_init(__i) }
{ }
bool
@@ -313,6 +314,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__atomic_clear (&_M_i, __m);
}
+
+ private:
+ static constexpr __atomic_flag_data_type
+ _S_init(bool __i)
+ { return __i ? __GCC_ATOMIC_TEST_AND_SET_TRUEVAL : 0; }
};
diff --git a/libstdc++-v3/include/ext/cmath b/libstdc++-v3/include/ext/cmath
new file mode 100644
index 00000000000..c17a53f1b10
--- /dev/null
+++ b/libstdc++-v3/include/ext/cmath
@@ -0,0 +1,152 @@
+// Math extensions -*- C++ -*-
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/cmath
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _EXT_CMATH
+#define _EXT_CMATH 1
+
+#pragma GCC system_header
+
+#if __cplusplus < 201103L
+# include <bits/c++0x_warning.h>
+#else
+
+#include <cmath>
+#include <type_traits>
+
+namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // A class for math constants.
+ template<typename _RealType>
+ struct __math_constants
+ {
+ static_assert(std::is_floating_point<_RealType>::value,
+ "template argument not a floating point type");
+
+ // Constant @f$ \pi @f$.
+ static constexpr _RealType __pi = 3.1415926535897932384626433832795029L;
+ // Constant @f$ \pi / 2 @f$.
+ static constexpr _RealType __pi_half = 1.5707963267948966192313216916397514L;
+ // Constant @f$ \pi / 3 @f$.
+ static constexpr _RealType __pi_third = 1.0471975511965977461542144610931676L;
+ // Constant @f$ \pi / 4 @f$.
+ static constexpr _RealType __pi_quarter = 0.7853981633974483096156608458198757L;
+ // Constant @f$ \sqrt(\pi / 2) @f$.
+ static constexpr _RealType __root_pi_div_2 = 1.2533141373155002512078826424055226L;
+ // Constant @f$ 1 / \pi @f$.
+ static constexpr _RealType __one_div_pi = 0.3183098861837906715377675267450287L;
+ // Constant @f$ 2 / \pi @f$.
+ static constexpr _RealType __two_div_pi = 0.6366197723675813430755350534900574L;
+ // Constant @f$ 2 / \sqrt(\pi) @f$.
+ static constexpr _RealType __two_div_root_pi = 1.1283791670955125738961589031215452L;
+
+ // Constant Euler's number @f$ e @f$.
+ static constexpr _RealType __e = 2.7182818284590452353602874713526625L;
+ // Constant @f$ 1 / e @f$.
+ static constexpr _RealType __one_div_e = 0.36787944117144232159552377016146087L;
+ // Constant @f$ \log_2(e) @f$.
+ static constexpr _RealType __log2_e = 1.4426950408889634073599246810018921L;
+ // Constant @f$ \log_10(e) @f$.
+ static constexpr _RealType __log10_e = 0.4342944819032518276511289189166051L;
+ // Constant @f$ \ln(2) @f$.
+ static constexpr _RealType __ln_2 = 0.6931471805599453094172321214581766L;
+ // Constant @f$ \ln(3) @f$.
+ static constexpr _RealType __ln_3 = 1.0986122886681096913952452369225257L;
+ // Constant @f$ \ln(10) @f$.
+ static constexpr _RealType __ln_10 = 2.3025850929940456840179914546843642L;
+
+ // Constant Euler-Mascheroni @f$ \gamma_E @f$.
+ static constexpr _RealType __gamma_e = 0.5772156649015328606065120900824024L;
+ // Constant Golden Ratio @f$ \phi @f$.
+ static constexpr _RealType __phi = 1.6180339887498948482045868343656381L;
+
+ // Constant @f$ \sqrt(2) @f$.
+ static constexpr _RealType __root_2 = 1.4142135623730950488016887242096981L;
+ // Constant @f$ \sqrt(3) @f$.
+ static constexpr _RealType __root_3 = 1.7320508075688772935274463415058724L;
+ // Constant @f$ \sqrt(5) @f$.
+ static constexpr _RealType __root_5 = 2.2360679774997896964091736687312762L;
+ // Constant @f$ \sqrt(7) @f$.
+ static constexpr _RealType __root_7 = 2.6457513110645905905016157536392604L;
+ // Constant @f$ 1 / \sqrt(2) @f$.
+ static constexpr _RealType __one_div_root_2 = 0.7071067811865475244008443621048490L;
+ };
+
+ // And the template definitions for the constants.
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__pi;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__pi_half;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__pi_third;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__pi_quarter;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__root_pi_div_2;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__one_div_pi;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__two_div_pi;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__two_div_root_pi;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__e;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__one_div_e;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__log2_e;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__log10_e;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__ln_2;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__ln_3;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__ln_10;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__gamma_e;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__phi;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__root_2;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__root_3;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__root_5;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__root_7;
+ template<typename _RealType>
+ constexpr _RealType __math_constants<_RealType>::__one_div_root_2;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace __gnu_cxx
+
+#endif // C++11
+
+#endif // _EXT_CMATH
diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random
index d76c7d3efd6..51d332b4c40 100644
--- a/libstdc++-v3/include/ext/random
+++ b/libstdc++-v3/include/ext/random
@@ -37,6 +37,7 @@
#include <random>
#include <array>
+#include <ext/cmath>
#ifdef __SSE2__
# include <x86intrin.h>
#endif
@@ -958,7 +959,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const param_type& __p1, const param_type& __p2)
{ return __p1._M_nu == __p2._M_nu
- && __p1._M_sigma == __p2._M_sigma; }
+ && __p1._M_sigma == __p2._M_sigma; }
private:
void _M_initialize();
@@ -1055,7 +1056,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p)
- {
+ {
typename std::normal_distribution<result_type>::param_type
__px(__p.nu(), __p.sigma()), __py(result_type(0), __p.sigma());
result_type __x = this->_M_ndx(__px, __urng);
@@ -1200,7 +1201,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const param_type& __p1, const param_type& __p2)
{ return __p1._M_mu == __p2._M_mu
- && __p1._M_omega == __p2._M_omega; }
+ && __p1._M_omega == __p2._M_omega; }
private:
void _M_initialize();
@@ -1284,7 +1285,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p)
- {
+ {
typename std::gamma_distribution<result_type>::param_type
__pg(__p.mu(), __p.omega() / __p.mu());
return std::sqrt(this->_M_gd(__pg, __urng));
@@ -1521,7 +1522,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p)
- {
+ {
return __p.mu() * std::pow(this->_M_ud(__urng),
-result_type(1) / __p.alpha());
}
@@ -1673,7 +1674,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const param_type& __p1, const param_type& __p2)
{ return __p1._M_lambda == __p2._M_lambda
- && __p1._M_mu == __p2._M_mu
+ && __p1._M_mu == __p2._M_mu
&& __p1._M_nu == __p2._M_nu; }
private:
@@ -1921,14 +1922,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
result_type __b = result_type(1))
: _M_param(__a, __b),
_M_ud(-1.5707963267948966192313216916397514L,
- +1.5707963267948966192313216916397514L)
+ +1.5707963267948966192313216916397514L)
{ }
explicit
arcsine_distribution(const param_type& __p)
: _M_param(__p),
_M_ud(-1.5707963267948966192313216916397514L,
- +1.5707963267948966192313216916397514L)
+ +1.5707963267948966192313216916397514L)
{ }
/**
@@ -1994,7 +1995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p)
- {
+ {
result_type __x = std::sin(this->_M_ud(__urng));
return (__x * (__p.b() - __p.a())
+ __p.a() + __p.b()) / result_type(2);
@@ -2142,7 +2143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const param_type& __p1, const param_type& __p2)
{ return __p1._M_q == __p2._M_q
- && __p1._M_omega == __p2._M_omega; }
+ && __p1._M_omega == __p2._M_omega; }
private:
void _M_initialize();
@@ -2322,6 +2323,528 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const hoyt_distribution<_RealType>& __d2)
{ return !(__d1 == __d2); }
+
+ /**
+ * @brief A triangular distribution for random numbers.
+ *
+ * The formula for the triangular probability density function is
+ * @f[
+ * / 0 for x < a
+ * p(x|a,b,c) = | \frac{2(x-a)}{(c-a)(b-a)} for a <= x <= b
+ * | \frac{2(c-x)}{(c-a)(c-b)} for b < x <= c
+ * \ 0 for c < x
+ * @f]
+ *
+ * <table border=1 cellpadding=10 cellspacing=0>
+ * <caption align=top>Distribution Statistics</caption>
+ * <tr><td>Mean</td><td>@f$ \frac{a+b+c}{2} @f$</td></tr>
+ * <tr><td>Variance</td><td>@f$ \frac{a^2+b^2+c^2-ab-ac-bc}
+ * {18}@f$</td></tr>
+ * <tr><td>Range</td><td>@f$[a, c]@f$</td></tr>
+ * </table>
+ */
+ template<typename _RealType = double>
+ class triangular_distribution
+ {
+ static_assert(std::is_floating_point<_RealType>::value,
+ "template argument not a floating point type");
+
+ public:
+ /** The type of the range of the distribution. */
+ typedef _RealType result_type;
+ /** Parameter type. */
+ struct param_type
+ {
+ friend class triangular_distribution<_RealType>;
+
+ explicit
+ param_type(_RealType __a = _RealType(0),
+ _RealType __b = _RealType(0.5),
+ _RealType __c = _RealType(1))
+ : _M_a(__a), _M_b(__b), _M_c(__c)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b);
+ _GLIBCXX_DEBUG_ASSERT(_M_b <= _M_c);
+ _GLIBCXX_DEBUG_ASSERT(_M_a < _M_c);
+
+ _M_r_ab = (_M_b - _M_a) / (_M_c - _M_a);
+ _M_f_ab_ac = (_M_b - _M_a) * (_M_c - _M_a);
+ _M_f_bc_ac = (_M_c - _M_b) * (_M_c - _M_a);
+ }
+
+ _RealType
+ a() const
+ { return _M_a; }
+
+ _RealType
+ b() const
+ { return _M_b; }
+
+ _RealType
+ c() const
+ { return _M_c; }
+
+ friend bool
+ operator==(const param_type& __p1, const param_type& __p2)
+ { return (__p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b
+ && __p1._M_c == __p2._M_c); }
+
+ private:
+
+ _RealType _M_a;
+ _RealType _M_b;
+ _RealType _M_c;
+ _RealType _M_r_ab;
+ _RealType _M_f_ab_ac;
+ _RealType _M_f_bc_ac;
+ };
+
+ /**
+ * @brief Constructs a triangle distribution with parameters
+ * @f$ a @f$, @f$ b @f$ and @f$ c @f$.
+ */
+ explicit
+ triangular_distribution(result_type __a = result_type(0),
+ result_type __b = result_type(0.5),
+ result_type __c = result_type(1))
+ : _M_param(__a, __b, __c)
+ { }
+
+ explicit
+ triangular_distribution(const param_type& __p)
+ : _M_param(__p)
+ { }
+
+ /**
+ * @brief Resets the distribution state.
+ */
+ void
+ reset()
+ { }
+
+ /**
+ * @brief Returns the @f$ a @f$ of the distribution.
+ */
+ result_type
+ a() const
+ { return _M_param.a(); }
+
+ /**
+ * @brief Returns the @f$ b @f$ of the distribution.
+ */
+ result_type
+ b() const
+ { return _M_param.b(); }
+
+ /**
+ * @brief Returns the @f$ c @f$ of the distribution.
+ */
+ result_type
+ c() const
+ { return _M_param.c(); }
+
+ /**
+ * @brief Returns the parameter set of the distribution.
+ */
+ param_type
+ param() const
+ { return _M_param; }
+
+ /**
+ * @brief Sets the parameter set of the distribution.
+ * @param __param The new parameter set of the distribution.
+ */
+ void
+ param(const param_type& __param)
+ { _M_param = __param; }
+
+ /**
+ * @brief Returns the greatest lower bound value of the distribution.
+ */
+ result_type
+ min() const
+ { return _M_param._M_a; }
+
+ /**
+ * @brief Returns the least upper bound value of the distribution.
+ */
+ result_type
+ max() const
+ { return _M_param._M_c; }
+
+ /**
+ * @brief Generating functions.
+ */
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ { return this->operator()(__urng, _M_param); }
+
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ {
+ std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+ __aurng(__urng);
+ result_type __rnd = __aurng();
+ if (__rnd <= __p._M_r_ab)
+ return __p.a() + std::sqrt(__rnd * __p._M_f_ab_ac);
+ else
+ return __p.c() - std::sqrt((result_type(1) - __rnd)
+ * __p._M_f_bc_ac);
+ }
+
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng)
+ { this->__generate(__f, __t, __urng, _M_param); }
+
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ { this->__generate_impl(__f, __t, __urng, __p); }
+
+ template<typename _UniformRandomNumberGenerator>
+ void
+ __generate(result_type* __f, result_type* __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ { this->__generate_impl(__f, __t, __urng, __p); }
+
+ /**
+ * @brief Return true if two triangle distributions have the same
+ * parameters and the sequences that would be generated
+ * are equal.
+ */
+ friend bool
+ operator==(const triangular_distribution& __d1,
+ const triangular_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ /**
+ * @brief Inserts a %triangular_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %triangular_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const __gnu_cxx::triangular_distribution<_RealType1>& __x);
+
+ /**
+ * @brief Extracts a %triangular_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %triangular_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::triangular_distribution<_RealType1>& __x);
+
+ private:
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p);
+
+ param_type _M_param;
+ };
+
+ /**
+ * @brief Return true if two triangle distributions are different.
+ */
+ template<typename _RealType>
+ inline bool
+ operator!=(const __gnu_cxx::triangular_distribution<_RealType>& __d1,
+ const __gnu_cxx::triangular_distribution<_RealType>& __d2)
+ { return !(__d1 == __d2); }
+
+
+ /**
+ * @brief A von Mises distribution for random numbers.
+ *
+ * The formula for the von Mises probability density function is
+ * @f[
+ * p(x|\mu,\kappa) = \frac{e^{\kappa \cos(x-\mu)}}
+ * {2\pi I_0(\kappa)}
+ * @f]
+ *
+ * The generating functions use the method according to:
+ *
+ * D. J. Best and N. I. Fisher, 1979. "Efficient Simulation of the
+ * von Mises Distribution", Journal of the Royal Statistical Society.
+ * Series C (Applied Statistics), Vol. 28, No. 2, pp. 152-157.
+ *
+ * <table border=1 cellpadding=10 cellspacing=0>
+ * <caption align=top>Distribution Statistics</caption>
+ * <tr><td>Mean</td><td>@f$ \mu @f$</td></tr>
+ * <tr><td>Variance</td><td>@f$ 1-I_1(\kappa)/I_0(\kappa) @f$</td></tr>
+ * <tr><td>Range</td><td>@f$[-\pi, \pi]@f$</td></tr>
+ * </table>
+ */
+ template<typename _RealType = double>
+ class von_mises_distribution
+ {
+ static_assert(std::is_floating_point<_RealType>::value,
+ "template argument not a floating point type");
+
+ public:
+ /** The type of the range of the distribution. */
+ typedef _RealType result_type;
+ /** Parameter type. */
+ struct param_type
+ {
+ friend class von_mises_distribution<_RealType>;
+
+ explicit
+ param_type(_RealType __mu = _RealType(0),
+ _RealType __kappa = _RealType(1))
+ : _M_mu(__mu), _M_kappa(__kappa)
+ {
+ const _RealType __pi = __gnu_cxx::__math_constants<_RealType>::__pi;
+ _GLIBCXX_DEBUG_ASSERT(_M_mu >= -__pi && _M_mu <= __pi);
+ _GLIBCXX_DEBUG_ASSERT(_M_kappa >= _RealType(0));
+ }
+
+ _RealType
+ mu() const
+ { return _M_mu; }
+
+ _RealType
+ kappa() const
+ { return _M_kappa; }
+
+ friend bool
+ operator==(const param_type& __p1, const param_type& __p2)
+ { return __p1._M_kappa == __p2._M_kappa; }
+
+ private:
+
+ _RealType _M_mu;
+ _RealType _M_kappa;
+ };
+
+ /**
+ * @brief Constructs a beta distribution with parameters
+ * @f$\mu@f$ and @f$\kappa@f$.
+ */
+ explicit
+ von_mises_distribution(result_type __mu = result_type(0),
+ result_type __kappa = result_type(1))
+ : _M_param(__mu, __kappa)
+ { }
+
+ explicit
+ von_mises_distribution(const param_type& __p)
+ : _M_param(__p)
+ { }
+
+ /**
+ * @brief Resets the distribution state.
+ */
+ void
+ reset()
+ { }
+
+ /**
+ * @brief Returns the @f$ \mu @f$ of the distribution.
+ */
+ result_type
+ mu() const
+ { return _M_param.mu(); }
+
+ /**
+ * @brief Returns the @f$ \kappa @f$ of the distribution.
+ */
+ result_type
+ kappa() const
+ { return _M_param.kappa(); }
+
+ /**
+ * @brief Returns the parameter set of the distribution.
+ */
+ param_type
+ param() const
+ { return _M_param; }
+
+ /**
+ * @brief Sets the parameter set of the distribution.
+ * @param __param The new parameter set of the distribution.
+ */
+ void
+ param(const param_type& __param)
+ { _M_param = __param; }
+
+ /**
+ * @brief Returns the greatest lower bound value of the distribution.
+ */
+ result_type
+ min() const
+ {
+ return -__gnu_cxx::__math_constants<result_type>::__pi;
+ }
+
+ /**
+ * @brief Returns the least upper bound value of the distribution.
+ */
+ result_type
+ max() const
+ {
+ return __gnu_cxx::__math_constants<result_type>::__pi;
+ }
+
+ /**
+ * @brief Generating functions.
+ */
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ { return this->operator()(__urng, _M_param); }
+
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ {
+ const result_type __pi
+ = __gnu_cxx::__math_constants<result_type>::__pi;
+ std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
+ __aurng(__urng);
+ result_type __tau = (std::sqrt(result_type(4) * this->kappa()
+ * this->kappa() + result_type(1))
+ + result_type(1));
+ result_type __rho = ((__tau - std::sqrt(result_type(2) * __tau))
+ / (result_type(2) * this->kappa()));
+ result_type __r = ((result_type(1) + __rho * __rho)
+ / (result_type(2) * __rho));
+
+ result_type __f;
+ while (1)
+ {
+ result_type __rnd = std::cos(__pi * __aurng());
+ __f = (result_type(1) + __r * __rnd) / (__r + __rnd);
+ result_type __c = this->kappa() * (__r - __f);
+
+ result_type __rnd2 = __aurng();
+ if (__c * (result_type(2) - __c) > __rnd2)
+ break;
+ if (std::log(__c / __rnd2) >= __c - result_type(1))
+ break;
+ }
+
+ result_type __res = std::acos(__f);
+#if _GLIBCXX_USE_C99_MATH_TR1
+ __res = std::copysign(__res, __aurng() - result_type(0.5));
+#else
+ if (__aurng() < result_type(0.5))
+ __res = -__res;
+#endif
+ __res += this->mu();
+ if (__res > __pi)
+ __res -= result_type(2) * __pi;
+ else if (__res < -__pi)
+ __res += result_type(2) * __pi;
+ return __res;
+ }
+
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng)
+ { this->__generate(__f, __t, __urng, _M_param); }
+
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ { this->__generate_impl(__f, __t, __urng, __p); }
+
+ template<typename _UniformRandomNumberGenerator>
+ void
+ __generate(result_type* __f, result_type* __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p)
+ { this->__generate_impl(__f, __t, __urng, __p); }
+
+ /**
+ * @brief Return true if two von Mises distributions have the same
+ * parameters and the sequences that would be generated
+ * are equal.
+ */
+ friend bool
+ operator==(const von_mises_distribution& __d1,
+ const von_mises_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ /**
+ * @brief Inserts a %von_mises_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %von_mises_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const __gnu_cxx::von_mises_distribution<_RealType1>& __x);
+
+ /**
+ * @brief Extracts a %von_mises_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %von_mises_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::von_mises_distribution<_RealType1>& __x);
+
+ private:
+ template<typename _ForwardIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __p);
+
+ param_type _M_param;
+ };
+
+ /**
+ * @brief Return true if two von Mises distributions are different.
+ */
+ template<typename _RealType>
+ inline bool
+ operator!=(const __gnu_cxx::von_mises_distribution<_RealType>& __d1,
+ const __gnu_cxx::von_mises_distribution<_RealType>& __d2)
+ { return !(__d1 == __d2); }
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __gnu_cxx
diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc
index 25b93bf92b7..009e0effba8 100644
--- a/libstdc++-v3/include/ext/random.tcc
+++ b/libstdc++-v3/include/ext/random.tcc
@@ -1187,6 +1187,126 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __is;
}
+
+ template<typename _RealType>
+ template<typename _OutputIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ triangular_distribution<_RealType>::
+ __generate_impl(_OutputIterator __f, _OutputIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __param)
+ {
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>)
+
+ while (__f != __t)
+ *__f++ = this->operator()(__urng, __param);
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const __gnu_cxx::triangular_distribution<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+ __os << __x.a() << __space << __x.b() << __space << __x.c();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::triangular_distribution<_RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ _RealType __a, __b, __c;
+ __is >> __a >> __b >> __c;
+ __x.param(typename __gnu_cxx::triangular_distribution<_RealType>::
+ param_type(__a, __b, __c));
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _RealType>
+ template<typename _OutputIterator,
+ typename _UniformRandomNumberGenerator>
+ void
+ von_mises_distribution<_RealType>::
+ __generate_impl(_OutputIterator __f, _OutputIterator __t,
+ _UniformRandomNumberGenerator& __urng,
+ const param_type& __param)
+ {
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>)
+
+ while (__f != __t)
+ *__f++ = this->operator()(__urng, __param);
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const __gnu_cxx::von_mises_distribution<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(std::numeric_limits<_RealType>::max_digits10);
+
+ __os << __x.mu() << __space << __x.kappa();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::von_mises_distribution<_RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ _RealType __mu, __kappa;
+ __is >> __mu >> __kappa;
+ __x.param(typename __gnu_cxx::von_mises_distribution<_RealType>::
+ param_type(__mu, __kappa));
+
+ __is.flags(__flags);
+ return __is;
+ }
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic
index 8ed53eb0b02..813f5741a10 100644
--- a/libstdc++-v3/include/std/atomic
+++ b/libstdc++-v3/include/std/atomic
@@ -69,6 +69,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator=(bool __i) noexcept
{ return _M_base.operator=(__i); }
+ bool
+ operator=(bool __i) volatile noexcept
+ { return _M_base.operator=(__i); }
+
operator bool() const noexcept
{ return _M_base.load(); }
diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
index da8571c82d3..3b33df233e8 100644
--- a/libstdc++-v3/libsupc++/atexit_thread.cc
+++ b/libstdc++-v3/libsupc++/atexit_thread.cc
@@ -26,6 +26,20 @@
#include <new>
#include "bits/gthr.h"
+#if HAVE___CXA_THREAD_ATEXIT_IMPL
+
+extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
+ void *arg, void *d);
+extern "C" int
+__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
+ void *obj, void *dso_handle)
+ _GLIBCXX_NOTHROW
+{
+ return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
+}
+
+#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
+
namespace {
// One element in a singly-linked stack of cleanups.
struct elt
@@ -116,3 +130,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
return 0;
}
+
+#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc
new file mode 100644
index 00000000000..1d77a55b213
--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <atomic>
+void test01()
+{
+ using namespace std;
+ volatile atomic<bool> ab1 __attribute__((unused));
+ ab1 = true;
+ volatile atomic_bool ab2 __attribute__((unused));
+ ab2 = true;
+}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc
new file mode 100644
index 00000000000..64f3b972934
--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc
@@ -0,0 +1,26 @@
+// { dg-options "-std=gnu++0x -Wsystem-headers -Wnarrowing" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <atomic>
+void test01()
+{
+ using namespace std;
+ atomic_flag af __attribute__((unused)) = ATOMIC_FLAG_INIT;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc
new file mode 100644
index 00000000000..63303f81e6b
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<> u;
+ VERIFY( u.a() == 0.0 );
+ VERIFY( u.b() == 0.5 );
+ VERIFY( u.c() == 1.0 );
+ VERIFY( u.min() == 0.0 );
+ VERIFY( u.max() == 1.0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc
new file mode 100644
index 00000000000..8380965df46
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5);
+ VERIFY( u.a() == 1.5 );
+ VERIFY( u.b() == 3.0 );
+ VERIFY( u.c() == 3.5 );
+ VERIFY( u.min() == 1.5 );
+ VERIFY( u.max() == 3.5 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc
new file mode 100644
index 00000000000..c38ea4c58c4
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.0), v, w;
+
+ VERIFY( v == w );
+ VERIFY( !(u == v) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc
new file mode 100644
index 00000000000..c4a014ea2c8
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 5.0), v, w;
+
+ VERIFY( u != v );
+ VERIFY( !(v != w) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc
new file mode 100644
index 00000000000..7878376d93a
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <sstream>
+
+void
+test01()
+{
+ std::stringstream str;
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.5), v;
+ std::minstd_rand0 rng;
+
+ u(rng); // advance
+ str << u;
+
+ str >> v;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..189bdaf80c1
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+template class __gnu_cxx::triangular_distribution<float>;
+template class __gnu_cxx::triangular_distribution<double>;
+template class __gnu_cxx::triangular_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc
new file mode 100644
index 00000000000..835e8e7e9c7
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc
@@ -0,0 +1,34 @@
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+void
+test01()
+{
+ typedef __gnu_cxx::triangular_distribution<double> test_type;
+
+ typedef test_type::result_type result_type;
+ typedef test_type::param_type param_type;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc
new file mode 100644
index 00000000000..3183c85ed7e
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<> u;
+ VERIFY( u.mu() == 0.0 );
+ VERIFY( u.kappa() == 1.0 );
+ VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
+ VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc
new file mode 100644
index 00000000000..6c1f8f73007
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<> u(1.5, 3.0);
+ VERIFY( u.mu() == 1.5 );
+ VERIFY( u.kappa() == 3.0 );
+ VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
+ VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc
new file mode 100644
index 00000000000..569a9aae944
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
+
+ VERIFY( v == w );
+ VERIFY( !(u == v) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc
new file mode 100644
index 00000000000..a4d2d8ddfbd
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
+
+ VERIFY( u != v );
+ VERIFY( !(v != w) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc
new file mode 100644
index 00000000000..5437c136ae8
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <sstream>
+
+void
+test01()
+{
+ std::stringstream str;
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v;
+ std::minstd_rand0 rng;
+
+ u(rng); // advance
+ str << u;
+
+ str >> v;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..d93093f4d8f
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+template class __gnu_cxx::von_mises_distribution<float>;
+template class __gnu_cxx::von_mises_distribution<double>;
+template class __gnu_cxx::von_mises_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc
new file mode 100644
index 00000000000..c8c34abd3e2
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc
@@ -0,0 +1,34 @@
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+void
+test01()
+{
+ typedef __gnu_cxx::von_mises_distribution<double> test_type;
+
+ typedef test_type::result_type result_type;
+ typedef test_type::param_type param_type;
+}