summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-03 10:13:01 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-03 10:13:01 +0000
commit010f06acf4baf7e5a21703c45ea66d7391571c48 (patch)
tree5e8e0ff1b8ef67508c71b6d34eb8971ae0677101 /gcc
parentd7a4dcc1c04e2acfd66370a1c929a5d4a944c32b (diff)
downloadgcc-010f06acf4baf7e5a21703c45ea66d7391571c48.tar.gz
2014-04-03 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn rev.209052...}} git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@209053 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog102
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in11
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/config/i386/i386.md7
-rw-r--r--gcc/config/moxie/moxie.h4
-rw-r--r--gcc/config/moxie/moxie.md50
-rw-r--r--gcc/config/nios2/linux.h11
-rw-r--r--gcc/config/nios2/nios2.c33
-rw-r--r--gcc/config/nios2/nios2.md2
-rw-r--r--gcc/config/rs6000/rs6000.c7
-rw-r--r--gcc/config/rs6000/rs6000.md5
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/spu/spu.c2
-rw-r--r--gcc/config/spu/spu.md8
-rw-r--r--gcc/cp/ChangeLog38
-rw-r--r--gcc/cp/ChangeLog-20084
-rw-r--r--gcc/cp/ChangeLog-201020
-rw-r--r--gcc/cp/ChangeLog-20112
-rw-r--r--gcc/cp/ChangeLog-20122
-rw-r--r--gcc/cp/call.c3
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/cp/init.c31
-rw-r--r--gcc/cp/mangle.c23
-rw-r--r--gcc/cp/pt.c50
-rw-r--r--gcc/cp/tree.c12
-rw-r--r--gcc/cp/typeck2.c15
-rw-r--r--gcc/doc/extend.texi7
-rw-r--r--gcc/gimple-ssa-strength-reduction.c4
-rw-r--r--gcc/ipa-cp.c3
-rw-r--r--gcc/ipa-devirt.c39
-rw-r--r--gcc/ipa.c6
-rw-r--r--gcc/lra-constraints.c29
-rw-r--r--gcc/optabs.c9
-rw-r--r--gcc/testsuite/ChangeLog83
-rw-r--r--gcc/testsuite/ChangeLog-20082
-rw-r--r--gcc/testsuite/ChangeLog-201016
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag3.C7
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag6.C25
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag7.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist81.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist82.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31439.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic154.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic155.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-33964.C2
-rw-r--r--gcc/testsuite/g++.dg/init/ctor4-1.C21
-rw-r--r--gcc/testsuite/g++.dg/init/ctor4.C8
-rw-r--r--gcc/testsuite/g++.dg/template/crash97.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash98.C2
-rw-r--r--gcc/testsuite/g++.dg/template/partial5.C4
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60659.C58
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60729.cc10
-rw-r--r--gcc/testsuite/gcc.dg/attr-weakref-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr60704.c14
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53922.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60092.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60733.c36
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60650-2.c37
-rw-r--r--gcc/testsuite/gcc.target/i386/387-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/387-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpand-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-3.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-9.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr30970.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-5.c1
-rw-r--r--gcc/testsuite/lib/prune.exp2
100 files changed, 868 insertions, 154 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f931619059d..20447da43ba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,103 @@
+2014-04-03 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-cp.c (ipcp_verify_propagated_values): Also dump symtab and
+ mention gcc_unreachable before failing.
+ * ipa.c (symtab_remove_unreachable_nodes): Also print order of
+ removed symbols.
+
+2014-04-02 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60659
+ * ipa-devirt.c (get_polymorphic_call_info): Do not ICE on type inconsistent
+ code and instead mark the context inconsistent.
+ (possible_polymorphic_call_targets): For inconsistent contexts
+ return empty complete list.
+
+2014-04-02 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2)
+ (extendqisi2, extendhisi2): Define.
+ * config/moxie/moxie.h (DEFAULT_SIGNED_CHAR): Change to 0.
+ (WCHAR_TYPE): Change to unsigned int.
+
+2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/60733
+ * gimple-ssa-strength-reduction.c (ncd_with_phi): Change required
+ insertion point for PHI candidates to be the end of the feeding
+ block for the PHI argument.
+
+2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60650
+ * lra-constraints.c (process_alt_operands): Decrease reject for
+ earlyclobber matching.
+
+2014-04-02 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/s390/s390.c (s390_expand_insv): Use GET_MODE_BITSIZE.
+
+2014-04-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/spu.c (pad_bb): Do not crash when the last
+ insn is CODE_FOR_blockage.
+
+2014-04-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/spu.md ("insv"): Fail if bitoffset+bitsize
+ lies outside the target mode.
+
+2014-04-02 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/60735
+ * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If we have
+ software floating point or no floating point registers, do not
+ allow any type in the FPRs. Eliminate a test for SPE SIMD types
+ in GPRs that occurs after we tested for GPRs that would never be
+ true.
+
+ * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64):
+ Rewrite tests to use TARGET_DOUBLE_FLOAT and TARGET_E500_DOUBLE,
+ since the FMOVE64 type is DFmode/DDmode. If TARGET_E500_DOUBLE,
+ specifically allow DDmode, since that does not use the SPE SIMD
+ instructions.
+
+2014-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60729
+ * optabs.c (expand_abs_nojump): Honor flag_trapv only for
+ MODE_INTs. Properly use negv_optab.
+ (expand_abs): Likewise.
+
+2014-04-02 Richard Biener <rguenther@suse.de>
+
+ PR bootstrap/60719
+ * Makefile.in (install-driver): Guard extra installs with special
+ names properly.
+
+2014-04-01 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions):
+ Document vec_vgbbd.
+
+2014-04-01 Richard Henderson <rth@redhat.com>
+
+ PR target/60704
+ * config/i386/i386.md (*float<SWI48><MODEF>2_sse): Leave the second
+ alternative enabled before register allocation.
+
+2014-04-01 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * config/nios2/nios2.md (unspec): Remove UNSPEC_TLS, UNSPEC_TLS_LDM.
+ * config/nios2/nios2.c (nios2_function_profiler): Fix addi operand
+ typo.
+ (nios2_large_got_address): Remove unneeded 'sym' parameter.
+ (nios2_got_address): Update nios2_large_got_address call site.
+ (nios2_delegitimize_address): New function.
+ (TARGET_DELEGITIMIZE_ADDRESS): Define to nios2_delegitimize_address.
+ * config/nios2/linux.h (GLIBC_DYNAMIC_LINKER): Define.
+ (LINK_SPEC): Specify dynamic linker using GNU_USER_DYNAMIC_LINKER.
+
2014-04-01 Martin Husemann <martin@duskware.de>
* config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define __mips_o32
@@ -215,7 +315,7 @@
2014-03-27 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60650
- * lra-asign.c (find_hard_regno_for, spill_for): Add parameter
+ * lra-assign.c (find_hard_regno_for, spill_for): Add parameter
first_p. Use it.
(find_spills_for): New.
(assign_by_spills): Pass the new parameter to find_hard_regno_for.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index a7cffcf326d..cd99a911103 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20140401
+20140403
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fb9b834e02c..a5446a4ec83 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3344,10 +3344,13 @@ install-common: native lang.install-common installdirs
install-driver: installdirs xgcc$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
- -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
- -( cd $(DESTDIR)$(bindir) && \
- $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
- -if [ ! -f gcc-cross$(exeext) ] ; then \
+ -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
+ -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) \
+ -( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) \
+ fi
+ -if [ ! -f gcc-cross$(exeext) ] \
+ && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 250f4cf5b47..c83bf5497da 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2014-04-02 Marek Polacek <polacek@redhat.com>
+
+ * c-common.h (c_expand_expr): Remove declaration.
+
2014-03-28 Jakub Jelinek <jakub@redhat.com>
PR c++/60689
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 1099b108950..24959d83e33 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -928,8 +928,6 @@ extern bool vector_targets_convertible_p (const_tree t1, const_tree t2);
extern bool vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note);
extern tree c_build_vec_perm_expr (location_t, tree, tree, tree, bool = true);
-extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
-
extern void init_c_lex (void);
extern void c_cpp_builtins (cpp_reader *);
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index ca16173abbb..25e2e93e317 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4739,8 +4739,13 @@
&& X87_ENABLE_FLOAT (<MODEF:MODE>mode,
<SWI48:MODE>mode)")
(eq_attr "alternative" "1")
+ /* ??? For sched1 we need constrain_operands to be able to
+ select an alternative. Leave this enabled before RA. */
(symbol_ref "TARGET_INTER_UNIT_CONVERSIONS
- || optimize_function_for_size_p (cfun)")
+ || optimize_function_for_size_p (cfun)
+ || !(reload_completed
+ || reload_in_progress
+ || lra_in_progress)")
]
(symbol_ref "true")))
])
diff --git a/gcc/config/moxie/moxie.h b/gcc/config/moxie/moxie.h
index 5379a431140..3a01dbab46d 100644
--- a/gcc/config/moxie/moxie.h
+++ b/gcc/config/moxie/moxie.h
@@ -59,7 +59,7 @@
#define DOUBLE_TYPE_SIZE 64
#define LONG_DOUBLE_TYPE_SIZE 64
-#define DEFAULT_SIGNED_CHAR 1
+#define DEFAULT_SIGNED_CHAR 0
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -68,7 +68,7 @@
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
-#define WCHAR_TYPE "long int"
+#define WCHAR_TYPE "unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
diff --git a/gcc/config/moxie/moxie.md b/gcc/config/moxie/moxie.md
index 713f9b65dcf..edefef80b81 100644
--- a/gcc/config/moxie/moxie.md
+++ b/gcc/config/moxie/moxie.md
@@ -239,6 +239,56 @@
ldo.l %0, %1"
[(set_attr "length" "2,2,6,2,6,2,6,6,6")])
+(define_insn_and_split "zero_extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,W,A,B")))]
+ ""
+ "@
+ ;
+ ld.b %0, %1
+ lda.b %0, %1
+ ldo.b %0, %1
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
+{
+ operands[2] = gen_lowpart (QImode, operands[0]);
+}
+ [(set_attr "length" "0,2,6,6")])
+
+(define_insn_and_split "zero_extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,W,A,B")))]
+ ""
+ "@
+ ;
+ ld.s %0, %1
+ lda.s %0, %1
+ ldo.s %0, %1
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
+{
+ operands[2] = gen_lowpart (HImode, operands[0]);
+}
+ [(set_attr "length" "0,2,6,6")])
+
+(define_insn "extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.b %0, %1"
+ [(set_attr "length" "2")])
+
+(define_insn "extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.s %0, %1"
+ [(set_attr "length" "2")])
+
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")
(match_operand:QI 1 "general_operand" ""))]
diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
index 47976f85b0d..3e77ca6c90f 100644
--- a/gcc/config/nios2/linux.h
+++ b/gcc/config/nios2/linux.h
@@ -26,11 +26,16 @@
} \
while (0)
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
+
#undef LINK_SPEC
#define LINK_SPEC LINK_SPEC_ENDIAN \
- " %{shared:-shared} \
- %{static:-Bstatic} \
- %{rdynamic:-export-dynamic}"
+ "%{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
+ %{static:-static}}"
/* This toolchain implements the ABI for Linux Systems documented in the
Nios II Processor Reference Handbook. */
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index edf9a618b3a..cdd2e6bc98b 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -695,7 +695,7 @@ nios2_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
fprintf (file, "\taddi\tr3, r3, %%lo(_gp_got - 1b)\n");
fprintf (file, "\tadd\tr2, r2, r3\n");
fprintf (file, "\tmovhi\tr3, %%call_hiadj(_mcount)\n");
- fprintf (file, "\taddi\tr3, %%call_lo(_mcount)\n");
+ fprintf (file, "\taddi\tr3, r3, %%call_lo(_mcount)\n");
fprintf (file, "\tadd\tr3, r2, r3\n");
fprintf (file, "\tldw\tr2, 0(r3)\n");
fprintf (file, "\tcallr\tr2\n");
@@ -1183,7 +1183,7 @@ nios2_unspec_offset (rtx loc, int unspec)
/* Generate GOT pointer based address with large offset. */
static rtx
-nios2_large_got_address (rtx sym, rtx offset)
+nios2_large_got_address (rtx offset)
{
rtx addr = gen_reg_rtx (Pmode);
emit_insn (gen_add3_insn (addr, pic_offset_table_rtx,
@@ -1199,7 +1199,7 @@ nios2_got_address (rtx loc, int unspec)
crtl->uses_pic_offset_table = 1;
if (nios2_large_offset_p (unspec))
- return nios2_large_got_address (loc, offset);
+ return nios2_large_got_address (offset);
return gen_rtx_PLUS (Pmode, pic_offset_table_rtx, offset);
}
@@ -1805,6 +1805,30 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
return x;
}
+static rtx
+nios2_delegitimize_address (rtx x)
+{
+ x = delegitimize_mem_from_attrs (x);
+
+ if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC)
+ {
+ switch (XINT (XEXP (x, 0), 1))
+ {
+ case UNSPEC_PIC_SYM:
+ case UNSPEC_PIC_CALL_SYM:
+ case UNSPEC_PIC_GOTOFF_SYM:
+ case UNSPEC_ADD_TLS_GD:
+ case UNSPEC_ADD_TLS_LDM:
+ case UNSPEC_LOAD_TLS_IE:
+ case UNSPEC_ADD_TLS_LE:
+ x = XVECEXP (XEXP (x, 0), 0, 0);
+ gcc_assert (GET_CODE (x) == SYMBOL_REF);
+ break;
+ }
+ }
+ return x;
+}
+
/* Main expander function for RTL moves. */
int
nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
@@ -3259,6 +3283,9 @@ nios2_merge_decl_attributes (tree olddecl, tree newdecl)
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS nios2_legitimize_address
+#undef TARGET_DELEGITIMIZE_ADDRESS
+#define TARGET_DELEGITIMIZE_ADDRESS nios2_delegitimize_address
+
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P nios2_legitimate_address_p
diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
index b5b599ece33..929d61e1f13 100644
--- a/gcc/config/nios2/nios2.md
+++ b/gcc/config/nios2/nios2.md
@@ -74,8 +74,6 @@
UNSPEC_PIC_SYM
UNSPEC_PIC_CALL_SYM
UNSPEC_PIC_GOTOFF_SYM
- UNSPEC_TLS
- UNSPEC_TLS_LDM
UNSPEC_LOAD_TLS_IE
UNSPEC_ADD_TLS_LE
UNSPEC_ADD_TLS_GD
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d9606a100d7..c50019198d6 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1752,6 +1752,9 @@ rs6000_hard_regno_mode_ok (int regno, enum machine_mode mode)
modes and DImode. */
if (FP_REGNO_P (regno))
{
+ if (TARGET_SOFT_FLOAT || !TARGET_FPRS)
+ return 0;
+
if (SCALAR_FLOAT_MODE_P (mode)
&& (mode != TDmode || (regno % 2) == 0)
&& FP_REGNO_P (last_regno))
@@ -1780,10 +1783,6 @@ rs6000_hard_regno_mode_ok (int regno, enum machine_mode mode)
return (VECTOR_MEM_ALTIVEC_OR_VSX_P (mode)
|| mode == V1TImode);
- /* ...but GPRs can hold SIMD data on the SPE in one register. */
- if (SPE_SIMD_REGNO_P (regno) && TARGET_SPE && SPE_VECTOR_MODE (mode))
- return 1;
-
/* We cannot put non-VSX TImode or PTImode anywhere except general register
and it must be able to fit within the register set. */
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 4bab9591e9f..9e1df980813 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9394,8 +9394,9 @@
[(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=Y,r,r,r,r,r")
(match_operand:FMOVE64 1 "input_operand" "r,Y,r,G,H,F"))]
"! TARGET_POWERPC64
- && ((TARGET_FPRS && TARGET_SINGLE_FLOAT)
- || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
+ && ((TARGET_FPRS && TARGET_DOUBLE_FLOAT)
+ || TARGET_SOFT_FLOAT
+ || (<MODE>mode == DDmode && TARGET_E500_DOUBLE))
&& (gpc_reg_operand (operands[0], <MODE>mode)
|| gpc_reg_operand (operands[1], <MODE>mode))"
"#"
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index bdb577c9748..aac8de848ac 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -4613,7 +4613,7 @@ s390_expand_insv (rtx dest, rtx op1, rtx op2, rtx src)
int smode_bsize, mode_bsize;
rtx op, clobber;
- if (bitsize + bitpos > GET_MODE_SIZE (mode))
+ if (bitsize + bitpos > GET_MODE_BITSIZE (mode))
return false;
/* Generate INSERT IMMEDIATE (IILL et al). */
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 302d7e06b6d..88e3f5e5909 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -2064,7 +2064,7 @@ pad_bb(void)
}
hbr_insn = insn;
}
- if (INSN_CODE (insn) == CODE_FOR_blockage)
+ if (INSN_CODE (insn) == CODE_FOR_blockage && next_insn)
{
if (GET_MODE (insn) == TImode)
PUT_MODE (next_insn, TImode);
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 228b2285969..3ac4bfc0b7c 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -2851,7 +2851,13 @@
(match_operand:SI 2 "const_int_operand" ""))
(match_operand 3 "nonmemory_operand" ""))]
""
- { spu_expand_insv(operands); DONE; })
+ {
+ if (INTVAL (operands[1]) + INTVAL (operands[2])
+ > GET_MODE_BITSIZE (GET_MODE (operands[0])))
+ FAIL;
+ spu_expand_insv(operands);
+ DONE;
+ })
;; Simplify a number of patterns that get generated by extv, extzv,
;; insv, and loads.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 553a05976cf..43094b38c8c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,36 @@
-2014-03-31 Patrick Palka patrick@parcs.ath.cx
+2014-04-01 Jason Merrill <jason@redhat.com>
+
+ * pt.c (process_partial_specialization): Say "not deducible"
+ rather than "not used". Use inform.
+
+ PR c++/60374
+ * pt.c (coerce_template_parms): Check that the pack expansion
+ pattern works with the first matching parameter.
+
+2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * init.c (perform_member_init): Homogenize uninitialized
+ diagnostics.
+
+2014-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/60708
+ * call.c (build_array_conv): Call complete_type.
+
+ PR c++/60713
+ * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
+ (picflag_from_initializer): Return it.
+ (process_init_constructor): Handle it.
+
+ PR c++/60642
+ * decl2.c (is_late_template_attribute): Don't defer abi_tag.
+ * mangle.c (write_unqualified_name): Fix abi_tag on templates.
+ * pt.c (get_template_info): Handle NAMESPACE_DECL.
+ (most_general_template): Handle more kinds of template.
+ * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
+ instantiations and specializations.
+
+2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
PR c++/44859
* typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
@@ -26,9 +58,9 @@
2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/52369
- * cp/method.c (walk_field_subobs): improve the diagnostic
+ * cp/method.c (walk_field_subobs): Improve the diagnostic
locations for both REFERENCE_TYPEs and non-static const members.
- * cp/init.c (diagnose_uninitialized_cst_or_ref_member): use %q#D
+ * cp/init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
instead of %qD to be consistent with the c++11 diagnostic.
2014-03-25 Jason Merrill <jason@redhat.com>
diff --git a/gcc/cp/ChangeLog-2008 b/gcc/cp/ChangeLog-2008
index 5a69a5d20a9..83fd123a75d 100644
--- a/gcc/cp/ChangeLog-2008
+++ b/gcc/cp/ChangeLog-2008
@@ -307,8 +307,8 @@
* g++spec.c (LIBSTDCXX_STATIC): New.
(lang_spec_driver): Use LIBSTDCXX_STATIC when not
shared_libgcc.
-
-2008-11-05 Fabien Chene <fabien.chene@gmail.com>
+
+2008-11-05 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/32519
* cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
diff --git a/gcc/cp/ChangeLog-2010 b/gcc/cp/ChangeLog-2010
index 5f563157c3a..e706b7cb853 100644
--- a/gcc/cp/ChangeLog-2010
+++ b/gcc/cp/ChangeLog-2010
@@ -3127,13 +3127,13 @@
* typeck.c (cp_build_modify_expr): Complain about assignment to
array from init list.
-2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-10 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43719
- * decl.c (check_initializer): strip array type before checking for
+ * decl.c (check_initializer): Strip array type before checking for
uninitialized const or ref members.
-2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43951
* init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
@@ -3258,12 +3258,12 @@
PR c++/43779
* typeck.c (warn_args_num): New function.
(convert_arguments): Use warn_args_num to print the diagnostic
- messages.
+ messages.
-2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-29 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43890
- * init.c (diagnose_uninitialized_cst_or_ref_member): check for
+ * init.c (diagnose_uninitialized_cst_or_ref_member): Check for
user-provided constructor while recursing.
2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
@@ -3277,10 +3277,10 @@
* init.c (perform_member_init): Check CLASS_TYPE_P.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/29043
- * init.c (perform_member_init): check for uninitialized const or
+ * init.c (perform_member_init): Check for uninitialized const or
reference members, including array types.
2010-04-24 Jason Merrill <jason@redhat.com>
@@ -3331,7 +3331,7 @@
convert_like_real.
* cp-tree.h: Adjust.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
Jason Merrill <jason@redhat.com>
PR c++/42844
@@ -3403,7 +3403,7 @@
* call.c (type_decays_to): Call cv_unqualified for non-class type.
-2010-04-12 Fabien Chene <fabien.chene@gmail.com>
+2010-04-12 Fabien Chêne <fabien@gcc.gnu.org>>
PR c++/25811
* cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
diff --git a/gcc/cp/ChangeLog-2011 b/gcc/cp/ChangeLog-2011
index 50659896501..02dde6e787a 100644
--- a/gcc/cp/ChangeLog-2011
+++ b/gcc/cp/ChangeLog-2011
@@ -3511,7 +3511,7 @@
2011-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/48859
- * init.c (diagnose_uninitialized_cst_or_ref_member_1): stop the
+ * init.c (diagnose_uninitialized_cst_or_ref_member_1): Stop the
recursion if there is user defined constructor.
2011-05-09 Jason Merrill <jason@redhat.com>
diff --git a/gcc/cp/ChangeLog-2012 b/gcc/cp/ChangeLog-2012
index a57051ebf5f..e63a3f79d1d 100644
--- a/gcc/cp/ChangeLog-2012
+++ b/gcc/cp/ChangeLog-2012
@@ -2716,7 +2716,7 @@
2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/52126
- * decl.c (xref_basetypes): call dependent_scope_p instead of
+ * decl.c (xref_basetypes): Call dependent_scope_p instead of
dependent_type_p.
2012-02-16 Jason Merrill <jason@redhat.com>
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 877f6d9cf17..ae0d4fff974 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -948,6 +948,9 @@ build_array_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
bool user = false;
enum conversion_rank rank = cr_exact;
+ /* We might need to propagate the size from the element to the array. */
+ complete_type (type);
+
if (TYPE_DOMAIN (type)
&& !variably_modified_type_p (TYPE_DOMAIN (type), NULL_TREE))
{
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index dfc532d5b0e..6c52e53bca0 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1169,8 +1169,9 @@ is_late_template_attribute (tree attr, tree decl)
/* Also defer most attributes on dependent types. This is not
necessary in all cases, but is the better default. */
else if (dependent_type_p (type)
- /* But attribute visibility specifically works on
- templates. */
+ /* But attributes abi_tag and visibility specifically apply
+ to templates. */
+ && !is_attribute_p ("abi_tag", name)
&& !is_attribute_p ("visibility", name))
return true;
else
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index f85776c5ec7..fdc1011f198 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -694,11 +694,14 @@ perform_member_init (tree member, tree init)
if (CP_TYPE_CONST_P (type)
&& init == NULL_TREE
&& default_init_uninitialized_part (type))
- /* TYPE_NEEDS_CONSTRUCTING can be set just because we have a
- vtable; still give this diagnostic. */
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized member %qD with %<const%> type %qT",
- member, type);
+ {
+ /* TYPE_NEEDS_CONSTRUCTING can be set just because we have a
+ vtable; still give this diagnostic. */
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized const member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member );
+ }
finish_expr_stmt (build_aggr_init (decl, init, flags,
tf_warning_or_error));
}
@@ -710,13 +713,19 @@ perform_member_init (tree member, tree init)
tree core_type;
/* member traversal: note it leaves init NULL */
if (TREE_CODE (type) == REFERENCE_TYPE)
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized reference member %qD",
- member);
+ {
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized reference member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member);
+ }
else if (CP_TYPE_CONST_P (type))
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized member %qD with %<const%> type %qT",
- member, type);
+ {
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized const member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member );
+ }
core_type = strip_array_types (type);
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 251edb14d16..da82dd6acda 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -180,7 +180,7 @@ static void write_unscoped_template_name (const tree);
static void write_nested_name (const tree);
static void write_prefix (const tree);
static void write_template_prefix (const tree);
-static void write_unqualified_name (const tree);
+static void write_unqualified_name (tree);
static void write_conversion_operator_name (const tree);
static void write_source_name (tree);
static void write_literal_operator_name (tree);
@@ -1195,7 +1195,7 @@ write_unqualified_id (tree identifier)
}
static void
-write_unqualified_name (const tree decl)
+write_unqualified_name (tree decl)
{
MANGLE_TRACE_TREE ("unqualified-name", decl);
@@ -1280,10 +1280,21 @@ write_unqualified_name (const tree decl)
write_source_name (DECL_NAME (decl));
}
- tree attrs = (TREE_CODE (decl) == TYPE_DECL
- ? TYPE_ATTRIBUTES (TREE_TYPE (decl))
- : DECL_ATTRIBUTES (decl));
- write_abi_tags (lookup_attribute ("abi_tag", attrs));
+ /* We use the ABI tags from the primary template, ignoring tags on any
+ specializations. This is necessary because C++ doesn't require a
+ specialization to be declared before it is used unless the use
+ requires a complete type, but we need to get the tags right on
+ incomplete types as well. */
+ if (tree tmpl = most_general_template (decl))
+ decl = DECL_TEMPLATE_RESULT (tmpl);
+ /* Don't crash on an unbound class template. */
+ if (decl)
+ {
+ tree attrs = (TREE_CODE (decl) == TYPE_DECL
+ ? TYPE_ATTRIBUTES (TREE_TYPE (decl))
+ : DECL_ATTRIBUTES (decl));
+ write_abi_tags (lookup_attribute ("abi_tag", attrs));
+ }
}
/* Write the unqualified-name for a conversion operator to TYPE. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c791d031ae1..7f4ef8b3519 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -320,6 +320,9 @@ get_template_info (const_tree t)
if (!t || t == error_mark_node)
return NULL;
+ if (TREE_CODE (t) == NAMESPACE_DECL)
+ return NULL;
+
if (DECL_P (t) && DECL_LANG_SPECIFIC (t))
tinfo = DECL_TEMPLATE_INFO (t);
@@ -4136,15 +4139,17 @@ process_partial_specialization (tree decl)
for (i = 0; i < ntparms; ++i)
if (tpd.parms[i] == 0)
{
- /* One of the template parms was not used in the
+ /* One of the template parms was not used in a deduced context in the
specialization. */
if (!did_error_intro)
{
- error ("template parameters not used in partial specialization:");
+ error ("template parameters not deducible in "
+ "partial specialization:");
did_error_intro = true;
}
- error (" %qD", TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
+ inform (input_location, " %qD",
+ TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
}
if (did_error_intro)
@@ -6930,6 +6935,26 @@ coerce_template_parms (tree parms,
{
if (PACK_EXPANSION_P (arg))
{
+ /* "If every valid specialization of a variadic template
+ requires an empty template parameter pack, the template is
+ ill-formed, no diagnostic required." So check that the
+ pattern works with this parameter. */
+ tree pattern = PACK_EXPANSION_PATTERN (arg);
+ tree conv = convert_template_argument (TREE_VALUE (parm),
+ pattern, new_args,
+ complain, parm_idx,
+ in_decl);
+ if (conv == error_mark_node)
+ {
+ inform (input_location, "so any instantiation with a "
+ "non-empty parameter pack would be ill-formed");
+ ++lost;
+ }
+ else if (TYPE_P (conv) && !TYPE_P (pattern))
+ /* Recover from missing typename. */
+ TREE_VEC_ELT (inner_args, arg_idx)
+ = make_pack_expansion (conv);
+
/* We don't know how many args we have yet, just
use the unconverted ones for now. */
new_inner_args = inner_args;
@@ -18758,23 +18783,18 @@ most_specialized_instantiation (tree templates)
tree
most_general_template (tree decl)
{
- /* If DECL is a FUNCTION_DECL, find the TEMPLATE_DECL of which it is
- an immediate specialization. */
- if (TREE_CODE (decl) == FUNCTION_DECL)
+ if (TREE_CODE (decl) != TEMPLATE_DECL)
{
- if (DECL_TEMPLATE_INFO (decl)) {
- decl = DECL_TI_TEMPLATE (decl);
-
- /* The DECL_TI_TEMPLATE can be an IDENTIFIER_NODE for a
- template friend. */
- if (TREE_CODE (decl) != TEMPLATE_DECL)
- return NULL_TREE;
- } else
+ if (tree tinfo = get_template_info (decl))
+ decl = TI_TEMPLATE (tinfo);
+ /* The TI_TEMPLATE can be an IDENTIFIER_NODE for a
+ template friend, or a FIELD_DECL for a capture pack. */
+ if (TREE_CODE (decl) != TEMPLATE_DECL)
return NULL_TREE;
}
/* Look for more and more general templates. */
- while (DECL_TEMPLATE_INFO (decl))
+ while (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
{
/* The DECL_TI_TEMPLATE can be an IDENTIFIER_NODE in some cases.
(See cp-tree.h for details.) */
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 5567253a61a..3429d2396f2 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3364,6 +3364,18 @@ handle_abi_tag_attribute (tree* node, tree name, tree args,
name, *node);
goto fail;
}
+ else if (CLASSTYPE_TEMPLATE_INSTANTIATION (*node))
+ {
+ warning (OPT_Wattributes, "ignoring %qE attribute applied to "
+ "template instantiation %qT", name, *node);
+ goto fail;
+ }
+ else if (CLASSTYPE_TEMPLATE_SPECIALIZATION (*node))
+ {
+ warning (OPT_Wattributes, "ignoring %qE attribute applied to "
+ "template specialization %qT", name, *node);
+ goto fail;
+ }
tree attributes = TYPE_ATTRIBUTES (*node);
tree decl = TYPE_NAME (*node);
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index bd21ad8c3f3..68e518a5c73 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1103,6 +1103,7 @@ digest_init_flags (tree type, tree init, int flags)
#define PICFLAG_ERRONEOUS 1
#define PICFLAG_NOT_ALL_CONSTANT 2
#define PICFLAG_NOT_ALL_SIMPLE 4
+#define PICFLAG_SIDE_EFFECTS 8
/* Given an initializer INIT, return the flag (PICFLAG_*) which better
describe it. */
@@ -1113,7 +1114,12 @@ picflag_from_initializer (tree init)
if (init == error_mark_node)
return PICFLAG_ERRONEOUS;
else if (!TREE_CONSTANT (init))
- return PICFLAG_NOT_ALL_CONSTANT;
+ {
+ if (TREE_SIDE_EFFECTS (init))
+ return PICFLAG_SIDE_EFFECTS;
+ else
+ return PICFLAG_NOT_ALL_CONSTANT;
+ }
else if (!initializer_constant_valid_p (init, TREE_TYPE (init)))
return PICFLAG_NOT_ALL_SIMPLE;
return 0;
@@ -1493,7 +1499,12 @@ process_init_constructor (tree type, tree init, tsubst_flags_t complain)
TREE_TYPE (init) = type;
if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE)
cp_complete_array_type (&TREE_TYPE (init), init, /*do_default=*/0);
- if (flags & PICFLAG_NOT_ALL_CONSTANT)
+ if (flags & PICFLAG_SIDE_EFFECTS)
+ {
+ TREE_CONSTANT (init) = false;
+ TREE_SIDE_EFFECTS (init) = true;
+ }
+ else if (flags & PICFLAG_NOT_ALL_CONSTANT)
/* Make sure TREE_CONSTANT isn't set from build_constructor. */
TREE_CONSTANT (init) = false;
else
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f9114ab0744..347a94a3aee 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -15099,6 +15099,9 @@ vector unsigned short vec_vclzh (vector unsigned short);
vector int vec_vclzw (vector int);
vector unsigned int vec_vclzw (vector int);
+vector signed char vec_vgbbd (vector signed char);
+vector unsigned char vec_vgbbd (vector unsigned char);
+
vector long long vec_vmaxsd (vector long long, vector long long);
vector unsigned long long vec_vmaxud (vector unsigned long long,
@@ -17542,6 +17545,10 @@ unimportant.
A redeclaration of a function or class must not add new ABI tags,
since doing so would change the mangled name.
+The ABI tags apply to a name, so all instantiations and
+specializations of a template have the same tags. The attribute will
+be ignored if applied to an explicit specialization or instantiation.
+
The @option{-Wabi-tag} flag enables a warning about a class which does
not have all the ABI tags used by its subobjects and virtual functions; for users with code
that needs to coexist with an earlier ABI, using this option can help
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 9320b51cb5d..9ad1b4f066e 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -3001,10 +3001,10 @@ ncd_with_phi (slsr_cand_t c, double_int incr, gimple phi,
{
slsr_cand_t arg_cand = base_cand_from_table (arg);
double_int diff = arg_cand->index - basis->index;
+ basic_block pred = gimple_phi_arg_edge (phi, i)->src;
if ((incr == diff) || (!address_arithmetic_p && incr == -diff))
- ncd = ncd_for_two_cands (ncd, gimple_bb (arg_cand->cand_stmt),
- *where, arg_cand, where);
+ ncd = ncd_for_two_cands (ncd, pred, *where, NULL, where);
}
}
}
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 05de8572492..689378a736f 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -884,8 +884,9 @@ ipcp_verify_propagated_values (void)
{
if (dump_file)
{
+ dump_symtab (dump_file);
fprintf (dump_file, "\nIPA lattices after constant "
- "propagation:\n");
+ "propagation, before gcc_unreachable:\n");
print_all_lattices (dump_file, true, false);
}
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 6fb14492a60..c84a26dba9a 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1214,7 +1214,13 @@ get_polymorphic_call_info (tree fndecl,
not part of outer type. */
if (!contains_type_p (TREE_TYPE (base),
context->offset + offset2, *otr_type))
- return base_pointer;
+ {
+ /* Use OTR_TOKEN = INT_MAX as a marker of probably type inconsistent
+ code sequences; we arrange the calls to be builtin_unreachable
+ later. */
+ *otr_token = INT_MAX;
+ return base_pointer;
+ }
get_polymorphic_call_info_for_decl (context, base,
context->offset + offset2);
return NULL;
@@ -1288,8 +1294,10 @@ get_polymorphic_call_info (tree fndecl,
if (!contains_type_p (context->outer_type, context->offset,
*otr_type))
{
- context->outer_type = NULL;
- gcc_unreachable ();
+ /* Use OTR_TOKEN = INT_MAX as a marker of probably type inconsistent
+ code sequences; we arrange the calls to be builtin_unreachable
+ later. */
+ *otr_token = INT_MAX;
return base_pointer;
}
context->maybe_derived_type = false;
@@ -1389,6 +1397,9 @@ devirt_variable_node_removal_hook (varpool_node *n,
temporarily change to one of base types. INCLUDE_DERIVER_TYPES make
us to walk the inheritance graph for all derivations.
+ OTR_TOKEN == INT_MAX is used to mark calls that are provably
+ undefined and should be redirected to unreachable.
+
If COMPLETEP is non-NULL, store true if the list is complete.
CACHE_TOKEN (if non-NULL) will get stored to an unique ID of entry
in the target cache. If user needs to visit every target list
@@ -1422,6 +1433,7 @@ possible_polymorphic_call_targets (tree otr_type,
bool complete;
bool can_refer;
+ /* If ODR is not initialized, return empty incomplete list. */
if (!odr_hash.is_created ())
{
if (completep)
@@ -1431,11 +1443,28 @@ possible_polymorphic_call_targets (tree otr_type,
return nodes;
}
+ /* If we hit type inconsistency, just return empty list of targets. */
+ if (otr_token == INT_MAX)
+ {
+ if (completep)
+ *completep = true;
+ if (nonconstruction_targetsp)
+ *nonconstruction_targetsp = 0;
+ return nodes;
+ }
+
type = get_odr_type (otr_type, true);
/* Lookup the outer class type we want to walk. */
- if (context.outer_type)
- get_class_context (&context, otr_type);
+ if (context.outer_type
+ && !get_class_context (&context, otr_type))
+ {
+ if (completep)
+ *completep = false;
+ if (nonconstruction_targetsp)
+ *nonconstruction_targetsp = 0;
+ return nodes;
+ }
/* We canonicalize our query, so we do not need extra hashtable entries. */
diff --git a/gcc/ipa.c b/gcc/ipa.c
index d23031286f2..435fff0d4cb 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -469,7 +469,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (!node->aux)
{
if (file)
- fprintf (file, " %s", node->name ());
+ fprintf (file, " %s/%i", node->name (), node->order);
cgraph_remove_node (node);
changed = true;
}
@@ -483,7 +483,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (node->definition)
{
if (file)
- fprintf (file, " %s", node->name ());
+ fprintf (file, " %s/%i", node->name (), node->order);
node->body_removed = true;
node->analyzed = false;
node->definition = false;
@@ -531,7 +531,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
&& (!flag_ltrans || !DECL_EXTERNAL (vnode->decl)))
{
if (file)
- fprintf (file, " %s", vnode->name ());
+ fprintf (file, " %s/%i", vnode->name (), vnode->order);
varpool_remove_node (vnode);
changed = true;
}
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index cfc3d7eaaee..aac50876d21 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1747,12 +1747,27 @@ process_alt_operands (int only_alternative)
[GET_MODE (*curr_id->operand_loc[m])]);
}
- /* We prefer no matching alternatives because
- it gives more freedom in RA. */
- if (operand_reg[nop] == NULL_RTX
- || (find_regno_note (curr_insn, REG_DEAD,
- REGNO (operand_reg[nop]))
- == NULL_RTX))
+ /* Prefer matching earlyclobber alternative as
+ it results in less hard regs required for
+ the insn than a non-matching earlyclobber
+ alternative. */
+ if (curr_static_id->operand[m].early_clobber)
+ {
+ if (lra_dump_file != NULL)
+ fprintf
+ (lra_dump_file,
+ " %d Matching earlyclobber alt:"
+ " reject--\n",
+ nop);
+ reject--;
+ }
+ /* Otherwise we prefer no matching
+ alternatives because it gives more freedom
+ in RA. */
+ else if (operand_reg[nop] == NULL_RTX
+ || (find_regno_note (curr_insn, REG_DEAD,
+ REGNO (operand_reg[nop]))
+ == NULL_RTX))
{
if (lra_dump_file != NULL)
fprintf
@@ -2143,7 +2158,7 @@ process_alt_operands (int only_alternative)
}
/* If the operand is dying, has a matching constraint,
and satisfies constraints of the matched operand
- which failed to satisfy the own constraints, probably
+ which failed to satisfy the own constraints, most probably
the reload for this operand will be gone. */
if (this_alternative_matches >= 0
&& !curr_alt_win[this_alternative_matches]
diff --git a/gcc/optabs.c b/gcc/optabs.c
index c4540f8856c..54f07ab02b9 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3384,7 +3384,8 @@ expand_abs_nojump (enum machine_mode mode, rtx op0, rtx target,
{
rtx temp;
- if (! flag_trapv)
+ if (GET_MODE_CLASS (mode) != MODE_INT
+ || ! flag_trapv)
result_unsignedp = 1;
/* First try to do it with a special abs instruction. */
@@ -3407,7 +3408,8 @@ expand_abs_nojump (enum machine_mode mode, rtx op0, rtx target,
{
rtx last = get_last_insn ();
- temp = expand_unop (mode, neg_optab, op0, NULL_RTX, 0);
+ temp = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
+ op0, NULL_RTX, 0);
if (temp != 0)
temp = expand_binop (mode, smax_optab, op0, temp, target, 0,
OPTAB_WIDEN);
@@ -3449,7 +3451,8 @@ expand_abs (enum machine_mode mode, rtx op0, rtx target,
{
rtx temp, op1;
- if (! flag_trapv)
+ if (GET_MODE_CLASS (mode) != MODE_INT
+ || ! flag_trapv)
result_unsignedp = 1;
temp = expand_abs_nojump (mode, op0, target, result_unsignedp);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 49bc03667b2..1ffa4b96ba6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,86 @@
+2014-04-02 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60659
+ * testsuite/g++.dg/torture/pr60659.C: New testcase.
+
+2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/60733
+ * gcc.dg/torture/pr60733.c: New test.
+
+2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60650
+ * gcc.target/arm/pr60650-2.c: New.
+
+2014-04-02 Joseph Myers <joseph@codesourcery.cmo>
+
+ * gcc.target/i386/avx2-vpand-3.c,
+ gcc.target/i386/avx256-unaligned-load-2.c: Use -mno-prefer-avx128.
+
+2014-04-02 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.target/i386/funcspec-2.c, gcc.target/i386/funcspec-3.c,
+ gcc.target/i386/funcspec-9.c, gcc.target/i386/isa-1.c,
+ gcc.target/i386/memcpy-strategy-1.c,
+ gcc.target/i386/memcpy-strategy-2.c,
+ gcc.target/i386/memcpy-vector_loop-1.c,
+ gcc.target/i386/memcpy-vector_loop-2.c,
+ gcc.target/i386/memset-vector_loop-1.c,
+ gcc.target/i386/memset-vector_loop-2.c,
+ gcc.target/i386/sse2-init-v2di-2.c, gcc.target/i386/ssetype-1.c,
+ gcc.target/i386/ssetype-2.c, gcc.target/i386/ssetype-5.c: Skip for
+ -march= options different from those in dg-options.
+
+2014-04-02 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.target/i386/387-3.c, gcc.target/i386/387-4.c,
+ gcc.target/i386/pr30970.c: Use -mtune=generic.
+ * gcc.target/i386/avx2-vpaddb-3.c,
+ gcc.target/i386/avx2-vpaddd-3.c, gcc.target/i386/avx2-vpaddq-3.c,
+ gcc.target/i386/avx2-vpaddw-3.c, gcc.target/i386/avx2-vpmulld-3.c,
+ gcc.target/i386/avx2-vpmullw-3.c, gcc.target/i386/avx2-vpsrad-3.c,
+ gcc.target/i386/avx2-vpsraw-3.c, gcc.target/i386/avx2-vpsrld-3.c,
+ gcc.target/i386/avx2-vpsrlw-3.c, gcc.target/i386/avx2-vpsubb-3.c,
+ gcc.target/i386/avx2-vpsubd-3.c, gcc.target/i386/avx2-vpsubq-3.c,
+ gcc.target/i386/avx2-vpsubw-3.c,
+ gcc.target/i386/avx256-unaligned-load-1.c,
+ gcc.target/i386/avx256-unaligned-load-4.c,
+ gcc.target/i386/avx256-unaligned-store-1.c,
+ gcc.target/i386/avx256-unaligned-store-2.c,
+ gcc.target/i386/avx256-unaligned-store-4.c: Use
+ -mno-prefer-avx128.
+
+2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Iain Sandoe <iain@codesourcery.com>
+
+ PR target/54083
+ * gcc.dg/attr-weakref-1.c: Allow the test on darwin
+ with the additional options -Wl,-undefined,dynamic_lookup
+ and -Wl,-flat_namespace.
+ * gcc.dg/torture/pr53922.c: Additional option
+ -Wl,-flat_namespace for darwin[89].
+ * gcc.dg/torture/pr60092.c: Additional options
+ -Wl,-undefined,dynamic_lookup and -Wl,-flat_namespace
+ for darwin[89].
+
+2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR target/43751
+ * lib/prune.exp: Modify the regular express to prune
+ the new warnings introduced by r205679 on darwin9.
+
+2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * g++.dg/init/ctor4.C: Adjust.
+ * g++.dg/init/ctor4-1.C: New.
+ * g++.dg/cpp0x/defaulted2.C: Adjust.
+
+2014-04-01 Richard Henderson <rth@redhat.com>
+
+ PR target/60704
+ * gcc.dg/pr60704.c: New file.
+
2014-04-01 Bin Cheng <bin.cheng@arm.com>
PR target/60363
diff --git a/gcc/testsuite/ChangeLog-2008 b/gcc/testsuite/ChangeLog-2008
index ca95319cbd4..2c354ff448f 100644
--- a/gcc/testsuite/ChangeLog-2008
+++ b/gcc/testsuite/ChangeLog-2008
@@ -1814,7 +1814,7 @@
* gcc.dg/Warray-bounds-5.c: New test.
* gcc.dg/Warray-bounds-6.c: New test.
-2008-11-05 Fabien Chene <fabien.chene@gmail.com>
+2008-11-05 Fabien Chene <fabien@gcc.gnu.org>
PR c++/32519
* g++.dg/template/pr32519.C: New test.
diff --git a/gcc/testsuite/ChangeLog-2010 b/gcc/testsuite/ChangeLog-2010
index b8d94644a47..47f39a3bc4a 100644
--- a/gcc/testsuite/ChangeLog-2010
+++ b/gcc/testsuite/ChangeLog-2010
@@ -11264,7 +11264,7 @@
* g++.dg/cpp0x/initlist26.C: Adjust.
* g++.dg/cpp0x/initlist28.C: Adjust.
-2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-10 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43719
* g++.dg/init/pr43719.C: New.
@@ -11389,7 +11389,7 @@
* gnat.dg/sizetype3.ad[sb]: New test.
* gnat.dg/sizetype3_pkg.ads: New helper.
-2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43951
* g++.dg/init/new29.C: New.
@@ -11738,12 +11738,6 @@
* gcc.dg/tree-ssa/builtin-free.c: New testcase.
-2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
-
- PR c++/43890
- * init.c (diagnose_uninitialized_cst_or_ref_member): check for
- user-provided constructor while recursing.
-
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42274
@@ -11866,7 +11860,7 @@
* g++.dg/template/pr23510.C: Update.
* lib/prune.exp: Filter out 'recursively instantiated'.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/29043
* g++.dg/init/pr29043.C: New.
@@ -11898,7 +11892,7 @@
* g++.dg/template/sfinae17.C: New.
* g++.dg/template/sfinae18.C: New.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
* g++.dg/init/pr42844.C: New.
* g++.dg/cpp0x/pr42844-2.C: New.
@@ -12500,7 +12494,7 @@
* g++.dg/cpp0x/lambda/lambda-conv4.C: New.
* g++.dg/cpp0x/lambda/lambda-deduce2.C: New.
-2010-04-12 Fabien Chene <fabien.chene@gmail.com>
+2010-04-12 Fabien Chene <fabien@gcc.gnu.org>
PR c++/25811
* g++.dg/init/pr25811.C: New test.
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag3.C b/gcc/testsuite/g++.dg/abi/abi-tag3.C
index 05fd58e9402..13cb3c2f2e9 100644
--- a/gcc/testsuite/g++.dg/abi/abi-tag3.C
+++ b/gcc/testsuite/g++.dg/abi/abi-tag3.C
@@ -1,5 +1,4 @@
-// An explicit specialization doesn't get the tag from its template unless
-// it is specified there, too.
+// An explicit specialization gets the tag from its template.
// { dg-final { scan-assembler "_ZN3FooB5cxx11IcE1fEv" } }
template<typename T>
@@ -12,12 +11,12 @@ struct __attribute ((abi_tag("cxx11"))) Foo
template<>
struct
__attribute ((abi_tag("cxx11")))
-Foo<int>
+Foo<int> // { dg-warning "attribute" }
{
int f();
};
-// { dg-final { scan-assembler "_ZN3FooIdE1fEv" } }
+// { dg-final { scan-assembler "_ZN3FooB5cxx11IdE1fEv" } }
template<>
struct
Foo<double>
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag6.C b/gcc/testsuite/g++.dg/abi/abi-tag6.C
new file mode 100644
index 00000000000..94ea2f37b6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag6.C
@@ -0,0 +1,25 @@
+// PR c++/60642
+
+struct __attribute((abi_tag("test"))) foo
+{
+ void f();
+ virtual ~foo();
+};
+
+template<typename>
+struct __attribute((abi_tag("test"))) bar
+{
+ void f();
+ virtual ~bar();
+};
+
+int main()
+{
+ foo f;
+ f.f();
+
+ bar<int> b;
+ b.f();
+}
+
+// { dg-final { scan-assembler "_ZTV3barB4testIiE" } }
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag7.C b/gcc/testsuite/g++.dg/abi/abi-tag7.C
new file mode 100644
index 00000000000..4c47725c536
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag7.C
@@ -0,0 +1,9 @@
+// PR c++/60642
+
+template<typename T>
+class __attribute((abi_tag("foo"))) test{ };
+
+template class __attribute((abi_tag("foo"))) test<int>; // { dg-warning "attribute" }
+
+void f(test<char>*) {}
+// { dg-final { scan-assembler "_Z1fP4testB3fooIcE" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
index bd83c7fb279..63be99754cd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
@@ -35,7 +35,7 @@ struct D: public C
struct E
{
- const B b;
+ const B b; // { dg-message "should be initialized" }
E() { } // { dg-error "uninitialized" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist81.C b/gcc/testsuite/g++.dg/cpp0x/initlist81.C
new file mode 100644
index 00000000000..5978c638893
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist81.C
@@ -0,0 +1,25 @@
+// PR c++/60713
+// { dg-options "-O" }
+// { dg-do compile { target c++11 } }
+
+template < class x0, class x1, class x2, class x3, class x4 >
+int *x5 (x0 *, x2 (x1::*)(x3, x4));
+
+class x6
+{
+ void x7 ();
+ struct x8
+ {
+ int *x9;
+ };
+ void x10 (x8);
+ void x11 (int *, int *);
+};
+
+void
+x6::x7 ()
+{
+ x10 ({
+ x5 (this, &x6::x11)
+ });
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist82.C b/gcc/testsuite/g++.dg/cpp0x/initlist82.C
new file mode 100644
index 00000000000..3b9ccad6667
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist82.C
@@ -0,0 +1,20 @@
+// PR c++/60708
+// { dg-do compile { target c++11 } }
+
+template <class T, class U> struct mypair {
+ mypair(T, U) {}
+};
+
+template<typename T> struct S {
+ mypair<T *, int> get_pair() noexcept {
+ return mypair<T*,int>(nullptr, 0);
+ }
+};
+
+static void foo(const mypair<char *, int> (&a)[2]) noexcept { }
+
+int main()
+{
+ S<char> s;
+ foo({s.get_pair(), s.get_pair()});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31439.C b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
index f75373555ce..df50e41cdb5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31439.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
@@ -1,7 +1,7 @@
// { dg-do compile { target c++11 } }
template<typename...> struct A;
-template<char> struct A<> {}; // { dg-error "not used in partial specialization|anonymous|declaration" }
+template<char> struct A<> {}; // { dg-error "not deducible|anonymous|declaration" }
template<typename T, typename... U> struct A<T, U...> : A<U...> {}; // { dg-error "incomplete type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic154.C b/gcc/testsuite/g++.dg/cpp0x/variadic154.C
new file mode 100644
index 00000000000..198f9c5ba39
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic154.C
@@ -0,0 +1,8 @@
+// PR c++/60374
+// { dg-do compile { target c++11 } }
+
+template<typename> struct A {};
+
+template<typename...T> struct A<T::T...> {}; // { dg-error "typename|partial|T" }
+
+A<int> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic155.C b/gcc/testsuite/g++.dg/cpp0x/variadic155.C
new file mode 100644
index 00000000000..d912317bdc4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic155.C
@@ -0,0 +1,4 @@
+// { dg-do compile { target c++11 } }
+
+template <typename T> struct A {};
+template <int... I> struct B: A<I...> {}; // { dg-error "type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
index 9e40737d5f0..8cbc0d6478d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
@@ -6,7 +6,7 @@ struct foo
};
template<typename ... Args>
-struct foo< typename Args::is_applied... > // { dg-error "not used|Args" }
+struct foo< typename Args::is_applied... > // { dg-error "not deducible|Args" }
{
static bool const value = false;
};
diff --git a/gcc/testsuite/g++.dg/init/ctor4-1.C b/gcc/testsuite/g++.dg/init/ctor4-1.C
new file mode 100644
index 00000000000..1333b35f9dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ctor4-1.C
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+class foo {
+public:
+ foo();
+};
+
+class bar: public foo { // { dg-error "uninitialized" }
+ // { dg-message "implicitly deleted" "" { target c++11 } 8 }
+private:
+ int const a; // { dg-message "should be initialized" }
+};
+
+foo::foo() {
+}
+
+int main(int argc, char **argv)
+{
+ bar x; // { dg-error "deleted" "" { target c++11 } }
+ // { dg-message "synthesized" "" { target { ! c++11 } } 19 }
+}
diff --git a/gcc/testsuite/g++.dg/init/ctor4.C b/gcc/testsuite/g++.dg/init/ctor4.C
index 1c92bb973d3..21034b6796d 100644
--- a/gcc/testsuite/g++.dg/init/ctor4.C
+++ b/gcc/testsuite/g++.dg/init/ctor4.C
@@ -6,9 +6,10 @@ public:
foo();
};
-class bar: public foo { // { dg-error "reference|bar::bar" }
+class bar: public foo { // { dg-error "uninitialized" }
+ // { dg-message "implicitly deleted" "" { target c++11 } 9 }
private:
- int &a;
+ int &a; // { dg-message "should be initialized" }
};
foo::foo() {
@@ -16,5 +17,6 @@ foo::foo() {
int main(int argc, char **argv)
{
- bar x; // { dg-message "synthesized|deleted" }
+ bar x; // { dg-error "deleted" "" { target c++11 } }
+ // { dg-message "synthesized" "" { target { ! c++11 } } 20 }
}
diff --git a/gcc/testsuite/g++.dg/template/crash97.C b/gcc/testsuite/g++.dg/template/crash97.C
index 3d177f4e534..7d2161f54f3 100644
--- a/gcc/testsuite/g++.dg/template/crash97.C
+++ b/gcc/testsuite/g++.dg/template/crash97.C
@@ -2,7 +2,7 @@
template<typename> struct A {};
-template<typename> struct A<int> // { dg-error "not used|template\\-parameter" }
+template<typename> struct A<int> // { dg-error "not deducible|template\\-parameter" }
{
template<int> void foo();
};
diff --git a/gcc/testsuite/g++.dg/template/crash98.C b/gcc/testsuite/g++.dg/template/crash98.C
index a79ab02f695..9d7d2ece145 100644
--- a/gcc/testsuite/g++.dg/template/crash98.C
+++ b/gcc/testsuite/g++.dg/template/crash98.C
@@ -2,7 +2,7 @@
template < typename > struct A;
-template < typename > struct A < int > // { dg-error "not used|template\\-parameter|declaration" }
+template < typename > struct A < int > // { dg-error "not deducible|template\\-parameter|declaration" }
{
int i;
int f ();
diff --git a/gcc/testsuite/g++.dg/template/partial5.C b/gcc/testsuite/g++.dg/template/partial5.C
index aa32e3b8a41..979e4c62bf6 100644
--- a/gcc/testsuite/g++.dg/template/partial5.C
+++ b/gcc/testsuite/g++.dg/template/partial5.C
@@ -4,7 +4,7 @@ template<typename T>
struct X { };
template<typename T>
-struct X<typename T::foo> { }; // { dg-error "not used|T" }
+struct X<typename T::foo> { }; // { dg-error "not deducible|T" }
template<int N>
struct X<int[N]> {}; // okay
@@ -14,7 +14,7 @@ template<typename T, typename T::foo V>
struct Y { };
template<typename T, typename U, U v>
-struct Y<T, v> { }; // { dg-error "not used|U" }
+struct Y<T, v> { }; // { dg-error "not deducible|U" }
template<typename T, T V>
diff --git a/gcc/testsuite/g++.dg/torture/pr60659.C b/gcc/testsuite/g++.dg/torture/pr60659.C
new file mode 100644
index 00000000000..f0158a5220a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60659.C
@@ -0,0 +1,58 @@
+// { dg-do compile }
+template <typename _InputIterator> void __distance (_InputIterator);
+template <typename _InputIterator>
+void distance (_InputIterator, _InputIterator p2)
+{
+ __distance (p2);
+}
+
+namespace boost
+{
+template <class Iterator> struct A
+{
+ typedef typename Iterator::difference_type type;
+};
+template <class T> typename T::const_iterator end (T &);
+template <class T> typename T::const_iterator begin (T &);
+template <class T> struct D : A<typename T::const_iterator>
+{
+};
+template <class T> typename D<T>::type distance (const T &p1)
+{
+ distance (boost::begin (p1), boost::end (p1));
+ return 0;
+}
+template <class IteratorT> class B
+{
+public:
+ typedef B type;
+ typedef IteratorT const_iterator;
+};
+}
+
+typedef int storage_t[];
+struct F;
+template <template <typename> class> struct G
+{
+ G (const G &p1) { p1.m_fn1 ().m_fn1 (0); }
+ const F &m_fn1 () const
+ {
+ const void *a;
+ a = &data_m;
+ return *static_cast<const F *>(a);
+ }
+ storage_t *data_m;
+};
+
+struct F
+{
+ virtual F *m_fn1 (void *) const;
+};
+template <typename> struct H;
+struct C : G<H>
+{
+ typedef int difference_type;
+};
+boost::B<C> AllTransVideos ();
+int b = boost::distance (AllTransVideos ());
+
diff --git a/gcc/testsuite/g++.dg/vect/pr60729.cc b/gcc/testsuite/g++.dg/vect/pr60729.cc
new file mode 100644
index 00000000000..fd472c50af2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60729.cc
@@ -0,0 +1,10 @@
+// { dg-do compile }
+// { dg-additional-options "-ftrapv" }
+
+void doSomething(int dim, double *Y, double *A)
+{
+ for (int k=0; k<dim; k++)
+ Y[k] += __builtin_fabs (A[k]);
+}
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gcc.dg/attr-weakref-1.c b/gcc/testsuite/gcc.dg/attr-weakref-1.c
index ee900fcdec5..9ed1c51b3ab 100644
--- a/gcc/testsuite/gcc.dg/attr-weakref-1.c
+++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c
@@ -4,12 +4,14 @@
// This test requires support for undefined weak symbols. This support
// is not available on hppa*-*-hpux*. The test is skipped rather than
// xfailed to suppress the warning that would otherwise arise.
-// { dg-skip-if "" { "*-*-darwin*" "hppa*-*-hpux*" "*-*-aix*" } "*" { "" } }
+// { dg-skip-if "" { "hppa*-*-hpux*" "*-*-aix*" } "*" { "" } }
// For kernel modules and static RTPs, the loader treats undefined weak
// symbols in the same way as undefined strong symbols. The test
// therefore fails to load, so skip it.
// { dg-skip-if "" { "*-*-vxworks*" && nonpic } "*" { "-non-static" } }
// { dg-options "-O2" }
+// { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }
+// { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } }
// { dg-additional-sources "attr-weakref-1a.c" }
// Copyright 2005 Free Software Foundation, Inc.
diff --git a/gcc/testsuite/gcc.dg/pr60704.c b/gcc/testsuite/gcc.dg/pr60704.c
new file mode 100644
index 00000000000..8a9af39fffa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60704.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-flive-range-shrinkage" } */
+/* { dg-additional-options "-march=amdfam10" { target { i?86-*-* x86_64-*-* } } } */
+
+struct S
+{
+ int n;
+};
+
+int
+foo (struct S s, double a)
+{
+ return s.n * a;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53922.c b/gcc/testsuite/gcc.dg/torture/pr53922.c
index d385587e391..3974dc660c3 100644
--- a/gcc/testsuite/gcc.dg/torture/pr53922.c
+++ b/gcc/testsuite/gcc.dg/torture/pr53922.c
@@ -4,6 +4,7 @@
/* { dg-skip-if "No undefined weak" { *-*-aix* } { "*" } { "" } } */
/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */
/* { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
+/* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */
int x(int a)
{
diff --git a/gcc/testsuite/gcc.dg/torture/pr60092.c b/gcc/testsuite/gcc.dg/torture/pr60092.c
index a596e13aa9e..337ff52955a 100644
--- a/gcc/testsuite/gcc.dg/torture/pr60092.c
+++ b/gcc/testsuite/gcc.dg/torture/pr60092.c
@@ -1,6 +1,8 @@
/* { dg-do run } */
/* { dg-require-weak "" } */
/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */
+/* { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
+/* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */
/* { dg-xfail-run-if "posix_memalign modifies first arg on error" { *-*-solaris2.11* } { "-O0" } } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/torture/pr60733.c b/gcc/testsuite/gcc.dg/torture/pr60733.c
new file mode 100644
index 00000000000..49cc59ea33a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60733.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+
+int a, d, e, f, g, h, i, j, k;
+unsigned short b;
+
+short
+fn1 (int p1, int p2)
+{
+ return p1 * p2;
+}
+
+int
+main ()
+{
+ for (; a; a--)
+ {
+ int l = 0;
+ if (f >= 0)
+ {
+ for (; h;)
+ e = 0;
+ for (; l != -6; l--)
+ {
+ j = fn1 (b--, d);
+ for (g = 0; g; g = 1)
+ ;
+ k = e ? 2 : 0;
+ }
+ i = 0;
+ for (;;)
+ ;
+ }
+ }
+ d = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c
new file mode 100644
index 00000000000..19467607b6e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */
+
+int a, h, j;
+long long d, e, i;
+int f;
+fn1 (void *p1, int p2)
+{
+ switch (p2)
+ case 8:
+{
+ register b = *(long long *) p1, c asm ("r2");
+ asm ("%0": "=r" (a), "=r" (c):"r" (b), "r" (0));
+ *(long long *) p1 = c;
+ }
+}
+
+fn2 ()
+{
+ int k;
+ k = f;
+ while (1)
+ {
+ fn1 (&i, sizeof i);
+ e = d + k;
+ switch (d)
+ case 0:
+ (
+ {
+ register l asm ("r4");
+ register m asm ("r0");
+ asm (" .err .endif\n\t": "=r" (h), "=r" (j):"r" (m),
+ "r"
+ (l));;
+ });
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/387-3.c b/gcc/testsuite/gcc.target/i386/387-3.c
index 1b8dc8bab3f..0c51a21b9de 100644
--- a/gcc/testsuite/gcc.target/i386/387-3.c
+++ b/gcc/testsuite/gcc.target/i386/387-3.c
@@ -1,6 +1,6 @@
/* Verify that 387 mathematical constants are recognized. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
+/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387 -mtune=generic" } */
/* { dg-final { scan-assembler "fldpi" } } */
/* { dg-require-effective-target large_long_double } */
diff --git a/gcc/testsuite/gcc.target/i386/387-4.c b/gcc/testsuite/gcc.target/i386/387-4.c
index 27c48ed20ab..10fe9311994 100644
--- a/gcc/testsuite/gcc.target/i386/387-4.c
+++ b/gcc/testsuite/gcc.target/i386/387-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfancy-math-387" } */
+/* { dg-options "-O2 -mfancy-math-387 -mtune=generic" } */
/* { dg-final { scan-assembler "fldpi" } } */
/* { dg-require-effective-target large_long_double } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
index 238f0209218..ee1f3135650 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
index c57ef8fea30..5c3f22f49c4 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
index 801bd39d82f..41a07d26d41 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
index facee9f2d57..7e7e018c103 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
index 67ca4a7cda1..8c08bf5ced5 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
index b2d539ba49a..8e33a986fb9 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
index 46d173fc371..4d61d7a9fff 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
index 97affb4bb7e..a788681c0f6 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
index e7112565b3a..70bd5cd6bfa 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
index 97affb4bb7e..a788681c0f6 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
index 67f3afc4131..691e02f3fa7 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
index 843128b4f27..45527f5241d 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
index f8f399f6b00..ae7966fbcc3 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
index 0a23a280e52..d96fee1779c 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
index 1cb90b5a8e3..404c2eea99b 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
index 1fe52bbb598..0c476cd78f2 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load -mno-prefer-avx128" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
index 933f265eed5..30b42aa38c2 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load -mno-prefer-avx128" } */
void
avx_test (char **cp, char **ep)
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
index 1d35ef57b48..dcd630d450c 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -fno-common" } */
+/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
index 77eaa422e4b..5e8c30d3622 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -fno-common" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
index 48e2efa1382..eeabfe9f3d1 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mno-prefer-avx128" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
index 85682452fae..68ff923103d 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -fno-common" } */
+/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-2.c b/gcc/testsuite/gcc.target/i386/funcspec-2.c
index 88c14b29b28..e535586f9b7 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-2.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-2.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-3.c b/gcc/testsuite/gcc.target/i386/funcspec-3.c
index f3f4db76a84..bac79865d99 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-3.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-3.c
@@ -2,6 +2,7 @@
setting the architecture. */
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mno-sse3" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-9.c b/gcc/testsuite/gcc.target/i386/funcspec-9.c
index 78714e12417..14b7abd2601 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-9.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-9.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/isa-1.c b/gcc/testsuite/gcc.target/i386/isa-1.c
index d98c14ffb19..3a4406fc0e4 100644
--- a/gcc/testsuite/gcc.target/i386/isa-1.c
+++ b/gcc/testsuite/gcc.target/i386/isa-1.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=x86-64" } } */
/* { dg-options "-march=x86-64 -msse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
index a2b66d966d0..3117771d431 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:-1:align" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
index c2f49f0cc5f..303edca950a 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:3000:align,libcall:-1:align" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
index c61c067951b..1ea682a1065 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
index 8a646d509a1..3befef95d82 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4} } */
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
index ad0d130371b..f7e45165c44 100644
--- a/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4 } } */
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
index f2ceb442c7b..92e61000425 100644
--- a/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4} } */
diff --git a/gcc/testsuite/gcc.target/i386/pr30970.c b/gcc/testsuite/gcc.target/i386/pr30970.c
index 96d64e5a962..b1fc2d3ecfa 100644
--- a/gcc/testsuite/gcc.target/i386/pr30970.c
+++ b/gcc/testsuite/gcc.target/i386/pr30970.c
@@ -1,5 +1,5 @@
/* { dg-do compile }
-/* { dg-options "-msse2 -O2 -ftree-vectorize" } */
+/* { dg-options "-msse2 -O2 -ftree-vectorize -mtune=generic" } */
#define N 256
int b[N];
diff --git a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
index a2313a4b190..6a50573a55e 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=core2" } } */
/* { dg-options "-O2 -msse4 -march=core2 -dp" } */
#include <emmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-1.c b/gcc/testsuite/gcc.target/i386/ssetype-1.c
index ef89059b8d8..a8252295587 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-1.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "andnpd\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-2.c b/gcc/testsuite/gcc.target/i386/ssetype-2.c
index b68a63923fb..37953ca64d0 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-2.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd" } } */
/* { dg-final { scan-assembler "andnpd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-5.c b/gcc/testsuite/gcc.target/i386/ssetype-5.c
index 75133e9fa68..4e22e59e556 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-5.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-5.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "pand\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "pandn\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 72ecde770d2..679d894e267 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -59,7 +59,7 @@ proc prune_gcc_output { text } {
# Ignore harmless warnings from Xcode 3.2.x.
regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
- regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
# Ignore harmless warnings from Xcode 4.0.