aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2008-05-13 21:03:32 +0000
committerDiego Novillo <dnovillo@google.com>2008-05-13 21:03:32 +0000
commit329cede1d45afd726434075c6769c4b5dd419ea6 (patch)
treeadde8281f1dbba544e406ffe72d96b9e29ea15f2
parent1b58f487852e7dace59ee3fa4df31aff8f34f3c4 (diff)
2008-05-13 Diego Novillo <dnovillo@google.com>
Mainline merge @135270 * configure.ac (ACX_PKGVERSION): Update revision merge string. * configure: Regenerate. gcc/lto/ChangeLog: 2008-05-13 Diego Novillo <dnovillo@google.com> * lto-function-in.c (input_ssa_names): Call make_ssa_name_fn instead of make_ssa_name. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@135274 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog8
-rw-r--r--MAINTAINERS4
-rw-r--r--config/ChangeLog6
-rw-r--r--config/acx.m45
-rw-r--r--gcc/ChangeLog154
-rw-r--r--gcc/ChangeLog-20075
-rw-r--r--gcc/ChangeLog.lto7
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in4
-rw-r--r--gcc/ada/ChangeLog25
-rw-r--r--gcc/ada/decl.c2
-rw-r--r--gcc/ada/sem_ch3.adb17
-rw-r--r--gcc/ada/trans.c11
-rw-r--r--gcc/ada/utils.c31
-rw-r--r--gcc/ada/utils2.c14
-rw-r--r--gcc/c.opt2
-rw-r--r--gcc/config/avr/avr.c6
-rw-r--r--gcc/config/avr/avr.h5
-rw-r--r--gcc/config/i386/i386.c618
-rw-r--r--gcc/config/i386/sse.md34
-rw-r--r--gcc/config/sh/sh.c1
-rwxr-xr-xgcc/configure236
-rw-r--r--gcc/configure.ac4
-rw-r--r--gcc/cp/ChangeLog33
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/class.c3
-rw-r--r--gcc/cp/error.c3
-rw-r--r--gcc/cp/parser.c6
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/cp/typeck2.c2
-rw-r--r--gcc/doc/cpp.texi91
-rw-r--r--gcc/doc/cppopts.texi4
-rw-r--r--gcc/doc/invoke.texi16
-rw-r--r--gcc/fold-const.c3
-rw-r--r--gcc/fortran/ChangeLog19
-rw-r--r--gcc/fortran/module.c2
-rw-r--r--gcc/fortran/target-memory.c38
-rw-r--r--gcc/fortran/trans.c16
-rw-r--r--gcc/gcse.c2
-rw-r--r--gcc/gimplify.c2
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jcf-dump.c6
-rw-r--r--gcc/lambda-code.c6
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-function-in.c2
-rw-r--r--gcc/matrix-reorg.c2
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c6
-rw-r--r--gcc/omp-low.c16
-rw-r--r--gcc/optc-gen.awk2
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/zh_CN.po112
-rw-r--r--gcc/pretty-print.c2
-rw-r--r--gcc/recog.c10
-rw-r--r--gcc/testsuite/ChangeLog160
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31438.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32125.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32126.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic81.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34055.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34606.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35331.C7
-rw-r--r--gcc/testsuite/g++.dg/opt/pr36185.C24
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20031125-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20031125-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20031203-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/acc1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr11832.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr21562.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr25483.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr32349.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr32355.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr33009.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr34448.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr34648.c3
-rw-r--r--gcc/testsuite/gcc.dg/20050607-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert3.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert4.c3
-rw-r--r--gcc/testsuite/gcc.dg/cpp/extratokens.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ident-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ident.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/import1.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/import2.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr22168-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr22168.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert2.c1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/assert3.c4
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/pch/import-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/import-1.hs2
-rw-r--r--gcc/testsuite/gcc.dg/pch/import-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/import-2.hs2
-rw-r--r--gcc/testsuite/gcc.dg/pr34457-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr36111.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr36227.c12
-rw-r--r--gcc/testsuite/gcc.dg/trampoline-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-set-epi32-1.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-set-epi64x-1.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-set-epi32-1.c42
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-set-epi64x-1.c42
-rw-r--r--gcc/testsuite/gcc.target/mips/mips.exp3
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-3.c3
-rw-r--r--gcc/testsuite/gfortran.dg/associated_5.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_denormal_1.f905
-rw-r--r--gcc/testsuite/gfortran.dg/fmt_t_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/fseek.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/nint_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_15.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_9.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/vect/O3-pr36119.f90 (renamed from gcc/testsuite/gfortran.dg/vect/pr36119.f)3
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect.exp6
-rw-r--r--gcc/testsuite/gfortran.dg/write_to_null.F90 (renamed from gcc/testsuite/gfortran.dg/write_to_null.f90)9
-rw-r--r--gcc/testsuite/gnat.dg/conv_integer.adb12
-rw-r--r--gcc/testsuite/gnat.dg/discr7.adb27
-rw-r--r--gcc/testsuite/gnat.dg/statically_matching.ads7
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp5
-rw-r--r--gcc/testsuite/lib/target-supports.exp2
-rw-r--r--gcc/tree-cfg.c37
-rw-r--r--gcc/tree-complex.c4
-rw-r--r--gcc/tree-flow-inline.h11
-rw-r--r--gcc/tree-flow.h21
-rw-r--r--gcc/tree-if-conv.c2
-rw-r--r--gcc/tree-inline.c2
-rw-r--r--gcc/tree-into-ssa.c6
-rw-r--r--gcc/tree-outof-ssa.c2
-rw-r--r--gcc/tree-parloops.c16
-rw-r--r--gcc/tree-phinodes.c2
-rw-r--r--gcc/tree-predcom.c10
-rw-r--r--gcc/tree-ssa-loop-im.c6
-rw-r--r--gcc/tree-ssa-loop-manip.c6
-rw-r--r--gcc/tree-ssa-phiopt.c8
-rw-r--r--gcc/tree-ssa-phiprop.c2
-rw-r--r--gcc/tree-ssa-pre.c4
-rw-r--r--gcc/tree-ssa-sccvn.c2
-rw-r--r--gcc/tree-ssanames.c33
-rw-r--r--gcc/tree-tailcall.c12
-rw-r--r--gcc/tree-vect-patterns.c2
-rw-r--r--gcc/tree-vect-transform.c76
-rw-r--r--gcc/tree.h22
-rw-r--r--gcc/value-prof.c4
-rw-r--r--gnattools/ChangeLog5
-rw-r--r--gnattools/Makefile.in5
-rw-r--r--libcpp/ChangeLog10
-rw-r--r--libcpp/directives.c34
-rw-r--r--libcpp/expr.c17
-rw-r--r--libcpp/include/cpplib.h7
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/io/list_read.c16
-rw-r--r--libstdc++-v3/ChangeLog25
-rw-r--r--libstdc++-v3/config/cpu/mips/atomicity.h86
-rw-r--r--libstdc++-v3/configure.host9
-rw-r--r--libstdc++-v3/include/debug/vector21
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-1.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-2.cc51
161 files changed, 2039 insertions, 897 deletions
diff --git a/ChangeLog b/ChangeLog
index 03a384c6dae..1ac9bcf5e27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * MAINTAINERS: Update my email address.
+
+2008-05-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * MAINTAINERS: Update my email address.
+
2008-05-03 Kris Van Hees <kris.van.hees@oracle.com>
* MAINTAINERS (Write After Approval): Add myself.
diff --git a/MAINTAINERS b/MAINTAINERS
index 7c1219b3c69..3af9f53377e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -64,7 +64,7 @@ m68k port Andreas Schwab schwab@suse.de
m68k-motorola-sysv port Philippe De Muyter phdm@macqel.be
mcore port Nick Clifton nickc@redhat.com
mips port Eric Christopher echristo@apple.com
-mips port Richard Sandiford rsandifo@nildram.co.uk
+mips port Richard Sandiford rdsandiford@googlemail.com
mmix port Hans-Peter Nilsson hp@bitrange.com
mn10300 port Jeff Law law@redhat.com
mn10300 port Alexandre Oliva aoliva@redhat.com
@@ -160,7 +160,7 @@ caller-save.c Jeff Law law@redhat.com
callgraph Jan Hubicka jh@suse.cz
debugging code Jim Wilson wilson@tuliptree.org
dwarf debugging code Jason Merrill jason@redhat.com
-c++ runtime libs Paolo Carlini pcarlini@suse.de
+c++ runtime libs Paolo Carlini paolo.carlini@oracle.com
c++ runtime libs Gabriel Dos Reis gdr@integrable-solutions.net
c++ runtime libs Ulrich Drepper drepper@redhat.com
c++ runtime libs Phil Edwards pme@gcc.gnu.org
diff --git a/config/ChangeLog b/config/ChangeLog
index 32c912682a6..92df0eb25a2 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-12 Samuel Tardieu <sam@rfc1149.net>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ PR ada/36001
+ * acx.m4: Add optional parameter to ACX_PROG_GNAT.
+
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
* override.m4: Apply _AC_ARG_VALIDATE fix to all versions
diff --git a/config/acx.m4 b/config/acx.m4
index d186a4ccccd..cea08b7204f 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -357,7 +357,8 @@ ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
# Test for GNAT.
# We require the gnatbind program, and a compiler driver that
-# understands Ada. We use the user's CC setting, already found.
+# understands Ada. We use the user's CC setting, already found,
+# and possibly add $1 to the command-line parameters.
#
# Sets the shell variable have_gnat to yes or no as appropriate, and
# substitutes GNATBIND and GNATMAKE.
@@ -380,7 +381,7 @@ acx_cv_cc_gcc_supports_ada=no
# Other compilers, like HP Tru64 UNIX cc, exit successfully when
# given a .adb file, but produce no object file. So we must check
# if an object file was really produced to guard against this.
-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+errors=`(${CC} $1[]m4_ifval([$1], [ ])-c conftest.adb) 2>&1 || echo failure`
if test x"$errors" = x && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
fi
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9cb32655ee..cd5f12b6d6e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,125 @@
+2008-05-13 Diego Novillo <dnovillo@google.com>
+ Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00748.html
+
+ * tree.h (init_phinodes, fini_phinodes, release_phi_node,
+ phinodes_print_statistics, init_ssanames, fini_ssanames,
+ make_ssa_name, duplicate_ssa_name,
+ duplicate_ssa_name_ptr_info, release_ssa_name,
+ release_defs, replace_ssa_name_symbol,
+ ssanames_print_statistics): Move ...
+ * tree-flow.h: ... here.
+ * tree-ssanames.c (init_ssanames): Add arguments FN and
+ SIZE. Use FN instead of cfun.
+ (make_ssa_name_fn): Rename from make_ssa_name.
+ (pass_release_ssa_names): Add TODO_dump_func to finish
+ flags.
+ * tree-flow-inline.h (make_ssa_name): Move from
+ tree-ssanames.c. Convert to static inline. Call
+ make_ssa_name_fn.
+ * omp-low.c (expand_omp_parallel):
+ * tree-flow-inline.h (redirect_edge_var_map_result):
+ * tree-ssa.c (init_tree_ssa): Add argument FN. Use it
+ instead of cfun.
+ Update all users.
+
+2008-05-13 Tom Tromey <tromey@redhat.com>
+
+ PR preprocessor/22168:
+ * doc/cpp.texi (Top): Update menu.
+ (Alternatives to Wrapper #ifndef): New node.
+ (Other Directives): Document deprecation.
+ (Obsolete Features): Remove menu.
+ (Assertions): Merge node into Obsolete Features.
+ (Obsolete once-only headers): Move earlier; rename to Alternatives
+ to Wrapper #ifndef.
+ * doc/cppopts.texi: Update.
+ * c.opt (Wdeprecated): Enable for C and ObjC.
+ * doc/invoke.texi (Option Summary): Move -Wno-deprecated.
+ (C++ Dialect Options): Move -Wno-deprecated from here to...
+ (Warning Options): ... here.
+
+2008-05-13 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/36227
+ * fold-const.c (fold_sign_changed_comparison): Do not allow
+ changes in pointer-ness.
+
+2008-05-12 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/24713
+ * config/sh/sh.c (sh_expand_prologue): Don't clear
+ RTX_FRAME_RELATED_P for push insns.
+
+2008-05-12 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ * config/avr/avr.h (MAX_OFILE_ALIGNMENT): Define.
+
+2008-05-12 Anatoly Sokolov <aesok@post.ru>
+
+ * config/avr/avr.h (machine_function): Add 'is_leaf' field.
+ * config/avr/avr.c (avr_regs_to_save): Compute 'machine->is_leaf'.
+ Use 'machine->is_leaf' instead of 'leaf_func_p'.
+
+2008-05-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/sse.md (*sse_concatv4sf): Renamed to ...
+ (*vec_concatv4sf_sse): This.
+ (*sse2_concatv2si): Renamed to ...
+ (*vec_concatv2si_sse2): This.
+ (*sse1_concatv2si): Renamed to ...
+ (*vec_concatv2si_sse): This.
+ (*vec_concatv2di_rex): Renamed to ...
+ (*vec_concatv2di_rex64): This.
+ (*vec_concatv2si_sse4_1): New.
+ (*vec_concatv2di_rex64_sse4_1): Likewise.
+
+2008-05-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/36111
+ * recog.c (validate_replace_rtx_1): Unshare new RTL expression
+ that was created for swappable operands.
+
+2008-05-12 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/36001
+ * Makefile.in: Substitute GNATMAKE and GNATBIND.
+ * configure.ac: Add call to ACX_PROG_GNAT.
+
+2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * optc-gen.awk: Fix comment typo.
+
+2008-05-11 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
+
+ * pretty-print.c (pp_integer_with_precision): Use
+ HOST_LONG_LONG_FORMAT.
+
+2008-05-10 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * gcse.c (store_killed_in_insn): Negated call to RTL_CONST_CALL_P.
+
+2008-05-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (bdesc_ptest): Removed.
+ (ix86_builtin_type): Add INT_FTYPE_V2DI_V2DI_PTEST.
+ (bdesc_args): Add __builtin_ia32_ptestz128,
+ __builtin_ia32_ptestc128 and __builtin_ia32_ptestnzc128.
+ (ix86_init_mmx_sse_builtins): Updated.
+ (ix86_expand_args_builtin): Handle INT_FTYPE_V2DI_V2DI_PTEST.
+ (ix86_expand_builtin): Updated.
+
+2008-05-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * tree-cfg.c (valid_fixed_convert_types_p): New function.
+ (verify_gimple_expr): Handle FIXED_CONVERT_EXPR.
+
+2008-05-10 Uros Bizjak <ubizjak@gmail.com>
+
+ * value-prof.c (interesting_stringop_to_profile): Do not
+ return early for BUILT_IN_MEMPCPY.
+
2008-05-09 H.J. Lu <hongjiu.lu@intel.com>
* calls.c (expand_call): Don't use callgraph to increase
@@ -18,10 +140,10 @@
2008-05-09 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/36129
- * tree-ssa-cpp.c: Include value-prof.h.
+ * tree-ssa-ccp.c: Include value-prof.h.
(execute_fold_all_builtins): Call gimple_remove_stmt_histograms if
built-in function was folded to a constant.
- * Makefile.in (tree-ssa-cpp.c): Depend on value-prof.h
+ * Makefile.in (tree-ssa-ccp.c): Depend on value-prof.h
2008-05-09 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
@@ -75,7 +197,8 @@
* convert.c (strip_float_extensions): Use CONVERT_EXPR_P.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise.
* config/alpha/alpha.c (va_list_skip_additions): Likewise.
- * c-common.c (c_alignof_expr, check_function_arguments_recurse): Likewise.
+ * c-common.c (c_alignof_expr, check_function_arguments_recurse):
+ Likewise.
* tree-ssa.c (tree_ssa_useless_type_conversion): Likewise.
* varasm.c (initializer_constant_valid_p, output_constant): Likewise.
* tree-ssa-forwprop.c (get_prop_source_stmt, can_propagate_from)
@@ -86,12 +209,14 @@
* emit-rtl.c (component_ref_for_mem_expr)
(set_mem_attributes_minus_bitpos): Likewise.
* tree-ssa-phiopt.c (conditional_replacement): Likewise.
- * gimplify.c (gimplify_conversion, goa_lhs_expr_p, gimplify_expr): Likewise.
+ * gimplify.c (gimplify_conversion, goa_lhs_expr_p, gimplify_expr):
+ Likewise.
* c-typeck.c (default_function_array_conversion, build_indirect_ref)
(build_function_call, pointer_diff, build_compound_expr)
(c_finish_return): Likewise.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Likewise.
- * matrix-reorg.c (get_inner_of_cast_expr, may_flatten_matrices_1): Likewise.
+ * matrix-reorg.c (get_inner_of_cast_expr, may_flatten_matrices_1):
+ Likewise.
* tree-ssa-ifcombine.c (recognize_single_bit_test): Likewise.
* expr.c (is_aligning_offset): Likewise.
* tree-ssa-alias.c (is_escape_site): Likewise.
@@ -111,22 +236,22 @@
* tree.c (really_constant_p, get_unwidened): Likewise.
* tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
* tree-ssa-loop-im.c (rewrite_bittest): Likewise.
- * tree-vrp.c (register_edge_assert_for_2, register_edge_assert_for_1): Likewise.
- * tree.h (STRIP_NOPS, STRIP_SIGN_NOPS, STRIP_TYPE_NOPS): Use CONVERT_EXPR_P.
+ * tree-vrp.c (register_edge_assert_for_2, register_edge_assert_for_1):
+ Likewise.
+ * tree.h (STRIP_NOPS, STRIP_SIGN_NOPS, STRIP_TYPE_NOPS): Use
+ CONVERT_EXPR_P.
(CONVERT_EXPR_P): Define.
(CASE_CONVERT): Define.
2008-05-08 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/36117
- * dce.c (deletable_insn_p): Do not delete calls if
- df_in_progress.
- (delete_unmarked_insns): When deleting a call, call
+ * dce.c (deletable_insn_p): Do not delete calls if df_in_progress.
+ (delete_unmarked_insns): When deleting a call, call
delete_unreachable_blocks.
* rtl.texi (RTL_CONST_CALL_P, RTL_PURE_CALL_P,
- RTL_CONST_OR_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P): Fixed
- doc.
-
+ RTL_CONST_OR_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P): Fixed doc.
+
2008-05-08 Richard Guenther <rguenther@suse.de>
* doc/invoke.texi (-fdump-tree-salias): Remove documentation.
@@ -314,8 +439,7 @@
(add_to_addressable_set): Likewise.
* tree-ssa.c (verify_ssa_name): Do not handle SFTs.
* tree-tailcall.c (suitable_for_tail_opt_p): Likewise.
- * tree-vect-transform.c (vect_create_data_ref_ptr): Do not
- set subvars.
+ * tree-vect-transform.c (vect_create_data_ref_ptr): Do not set subvars.
* tree.c (init_ttree): Remove STRUCT_FIELD_TAG initialization.
(tree_code_size): Remove STRUCT_FIELD_TAG handling.
(tree_node_structure): Likewise.
diff --git a/gcc/ChangeLog-2007 b/gcc/ChangeLog-2007
index 27f28128b76..5327a6cf8c1 100644
--- a/gcc/ChangeLog-2007
+++ b/gcc/ChangeLog-2007
@@ -2331,8 +2331,9 @@
2007-11-06 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
PR target/30961
- * reload1.c (find_reloads): Also check in_reg when handling a
- simple move with an input reload and a destination of a hard register.
+ * reload.c (find_reloads): Also check in_reg when handling a
+ simple move with an input reload and a destination of a hard
+ register.
2007-11-06 Maxim Kuvyrkov <maxim@codesourcery.com>
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index 8f404e8ec37..2ec6e80d797 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,3 +1,10 @@
+2008-05-13 Diego Novillo <dnovillo@google.com>
+
+ Mainline merge @135270
+
+ * configure.ac (ACX_PKGVERSION): Update revision merge string.
+ * configure: Regenerate.
+
2008-05-12 Diego Novillo <dnovillo@google.com>
Mainline merge @135136
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index cfaabee6346..b40b00067e0 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20080510
+20080513
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 87e1b53640e..945e0992208 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -875,6 +875,10 @@ LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
+# Used from ada/Make-lang.in
+GNATBIND = @GNATBIND@
+GNATMAKE = @GNATMAKE@
+
# Libs needed (at present) just for jcf-dump.
LDEXP_LIB = @LDEXP_LIB@
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5da66e0c595..cffae3bc3a7 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,28 @@
+2008-05-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/24880
+ PR ada/26635
+ * utils.c (convert) <INTEGER_TYPE>: When converting an additive
+ expression to an integral type with lower precision, use NOP_EXPR
+ directly in a couple of special cases.
+
+2008-05-12 Samuel Tardieu <sam@rfc1149.net>
+ Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Build_Derived_Record_Type): Accept statically matching
+ constraint expressions.
+
+2008-05-12 Tomas Bily <tbily@suse.cz>
+
+ * utils2.c (known_alignment, contains_save_expr_p)
+ (gnat_mark_addressable): Use CASE_CONVERT.
+ * decl.c (annotate_value): Likewise.
+ * trans.c (maybe_stabilize_reference): Likewise.
+ * utils2.c (build_binary_op): Use CONVERT_EXPR_P.
+ * utils.c (rest_of_record_type_compilation): Likewise.
+ * trans.c (protect_multiple_eval, Attribute_to_gnu)
+ (protect_multiple_eval): Likewise.
+
2008-05-08 Andreas Schwab <schwab@suse.de>
* utils.c (handle_pure_attribute, init_gigi_decls): Rename
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 6e144927ef8..8565305c2d5 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -6622,7 +6622,7 @@ annotate_value (tree gnu_size)
else
return No_Uint;
- case NOP_EXPR: case CONVERT_EXPR: case NON_LVALUE_EXPR:
+ CASE_CONVERT: case NON_LVALUE_EXPR:
return annotate_value (TREE_OPERAND (gnu_size, 0));
/* Now just list the operations we handle. */
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index d050d1b0505..dd08710e37e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -6268,8 +6268,8 @@ package body Sem_Ch3 is
and then Has_Private_Declaration (Derived_Type)
and then Present (Discriminant_Constraint (Derived_Type))
then
- -- Verify that constraints of the full view conform to those
- -- given in partial view.
+ -- Verify that constraints of the full view statically match
+ -- those given in the partial view.
declare
C1, C2 : Elmt_Id;
@@ -6278,9 +6278,18 @@ package body Sem_Ch3 is
C1 := First_Elmt (New_Discrs);
C2 := First_Elmt (Discriminant_Constraint (Derived_Type));
while Present (C1) and then Present (C2) loop
- if not
- Fully_Conformant_Expressions (Node (C1), Node (C2))
+
+ if Fully_Conformant_Expressions (Node (C1), Node (C2))
+ or else
+ (Is_OK_Static_Expression (Node (C1))
+ and then
+ Is_OK_Static_Expression (Node (C2))
+ and then
+ Expr_Value (Node (C1)) = Expr_Value (Node (C2)))
then
+ null;
+
+ else
Error_Msg_N (
"constraint not conformant to previous declaration",
Node (C1));
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 5ec3ecdd013..122857a9bbd 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -916,8 +916,7 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
if (attribute == Attr_Code_Address)
{
for (gnu_expr = gnu_result;
- TREE_CODE (gnu_expr) == NOP_EXPR
- || TREE_CODE (gnu_expr) == CONVERT_EXPR;
+ CONVERT_EXPR_P (gnu_expr);
gnu_expr = TREE_OPERAND (gnu_expr, 0))
TREE_CONSTANT (gnu_expr) = 1;
@@ -931,8 +930,7 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
else if (TREE_CODE (TREE_TYPE (gnu_prefix)) == FUNCTION_TYPE)
{
for (gnu_expr = gnu_result;
- TREE_CODE (gnu_expr) == NOP_EXPR
- || TREE_CODE (gnu_expr) == CONVERT_EXPR;
+ CONVERT_EXPR_P (gnu_expr);
gnu_expr = TREE_OPERAND (gnu_expr, 0))
;
@@ -6567,7 +6565,7 @@ protect_multiple_eval (tree exp)
actually need to protect the address since the data itself can't
change in these situations. */
else if (TREE_CODE (exp) == NON_LVALUE_EXPR
- || TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR
+ || CONVERT_EXPR_P (exp)
|| TREE_CODE (exp) == VIEW_CONVERT_EXPR
|| TREE_CODE (exp) == INDIRECT_REF
|| TREE_CODE (exp) == UNCONSTRAINED_ARRAY_REF)
@@ -6613,8 +6611,7 @@ maybe_stabilize_reference (tree ref, bool force, bool *success)
return ref;
case ADDR_EXPR:
- case NOP_EXPR:
- case CONVERT_EXPR:
+ CASE_CONVERT:
case FLOAT_EXPR:
case FIX_TRUNC_EXPR:
case VIEW_CONVERT_EXPR:
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 1cce8dae906..b4b38941ddb 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -1096,8 +1096,7 @@ rest_of_record_type_compilation (tree record_type)
/* Strip off any conversions. */
while (TREE_CODE (offset) == NON_LVALUE_EXPR
- || TREE_CODE (offset) == NOP_EXPR
- || TREE_CODE (offset) == CONVERT_EXPR)
+ || CONVERT_EXPR_P (offset))
offset = TREE_OPERAND (offset, 0);
/* An offset which is a bitwise AND with a negative power of 2
@@ -3628,7 +3627,7 @@ convert (tree type, tree expr)
if (TYPE_FAT_POINTER_P (type) && !TYPE_FAT_POINTER_P (etype))
return convert_to_fat_pointer (type, expr);
- /* If we're converting between two aggregate types that are mere
+ /* If we are converting between two aggregate types that are mere
variants, just make a VIEW_CONVERT_EXPR. */
else if (code == ecode
&& AGGREGATE_TYPE_P (type)
@@ -3663,6 +3662,30 @@ convert (tree type, tree expr)
/* ... fall through ... */
case ENUMERAL_TYPE:
+ /* If we are converting an additive expression to an integer type
+ with lower precision, be wary of the optimization that can be
+ applied by convert_to_integer. There are 2 problematic cases:
+ - if the first operand was originally of a biased type,
+ because we could be recursively called to convert it
+ to an intermediate type and thus rematerialize the
+ additive operator endlessly,
+ - if the expression contains a placeholder, because an
+ intermediate conversion that changes the sign could
+ be inserted and thus introduce an artificial overflow
+ at compile time when the placeholder is substituted. */
+ if (code == INTEGER_TYPE
+ && ecode == INTEGER_TYPE
+ && TYPE_PRECISION (type) < TYPE_PRECISION (etype)
+ && (TREE_CODE (expr) == PLUS_EXPR || TREE_CODE (expr) == MINUS_EXPR))
+ {
+ tree op0 = get_unwidened (TREE_OPERAND (expr, 0), type);
+
+ if ((TREE_CODE (TREE_TYPE (op0)) == INTEGER_TYPE
+ && TYPE_BIASED_REPRESENTATION_P (TREE_TYPE (op0)))
+ || CONTAINS_PLACEHOLDER_P (expr))
+ return build1 (NOP_EXPR, type, expr);
+ }
+
return fold (convert_to_integer (type, expr));
case POINTER_TYPE:
@@ -3788,7 +3811,7 @@ remove_conversions (tree exp, bool true_address)
break;
case VIEW_CONVERT_EXPR: case NON_LVALUE_EXPR:
- case NOP_EXPR: case CONVERT_EXPR:
+ CASE_CONVERT:
return remove_conversions (TREE_OPERAND (exp, 0), true_address);
default:
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index b45c7aca107..891463ce49c 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -156,9 +156,8 @@ known_alignment (tree exp)
switch (TREE_CODE (exp))
{
- case CONVERT_EXPR:
+ CASE_CONVERT:
case VIEW_CONVERT_EXPR:
- case NOP_EXPR:
case NON_LVALUE_EXPR:
/* Conversions between pointers and integers don't change the alignment
of the underlying object. */
@@ -293,7 +292,7 @@ contains_save_expr_p (tree exp)
case ADDR_EXPR: case INDIRECT_REF:
case COMPONENT_REF:
- case NOP_EXPR: case CONVERT_EXPR: case VIEW_CONVERT_EXPR:
+ CASE_CONVERT: case VIEW_CONVERT_EXPR:
return contains_save_expr_p (TREE_OPERAND (exp, 0));
case CONSTRUCTOR:
@@ -659,8 +658,7 @@ build_binary_op (enum tree_code op_code, tree result_type,
conversions between array and record types, except for justified
modular types. But don't do this if the right operand is not
BLKmode (for packed arrays) unless we are not changing the mode. */
- while ((TREE_CODE (left_operand) == CONVERT_EXPR
- || TREE_CODE (left_operand) == NOP_EXPR
+ while ((CONVERT_EXPR_P (left_operand)
|| TREE_CODE (left_operand) == VIEW_CONVERT_EXPR)
&& (((INTEGRAL_TYPE_P (left_type)
|| POINTER_TYPE_P (left_type))
@@ -742,8 +740,7 @@ build_binary_op (enum tree_code op_code, tree result_type,
result = TREE_OPERAND (result, 0);
else if (TREE_CODE (result) == REALPART_EXPR
|| TREE_CODE (result) == IMAGPART_EXPR
- || ((TREE_CODE (result) == NOP_EXPR
- || TREE_CODE (result) == CONVERT_EXPR)
+ || (CONVERT_EXPR_P (result)
&& (((TREE_CODE (restype)
== TREE_CODE (TREE_TYPE
(TREE_OPERAND (result, 0))))
@@ -2190,9 +2187,8 @@ gnat_mark_addressable (tree expr_node)
case REALPART_EXPR:
case IMAGPART_EXPR:
case VIEW_CONVERT_EXPR:
- case CONVERT_EXPR:
case NON_LVALUE_EXPR:
- case NOP_EXPR:
+ CASE_CONVERT:
expr_node = TREE_OPERAND (expr_node, 0);
break;
diff --git a/gcc/c.opt b/gcc/c.opt
index dd9013e1c37..09d5187bd2f 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -176,7 +176,7 @@ C ObjC Var(warn_declaration_after_statement) Warning
Warn when a declaration is found after a statement
Wdeprecated
-C++ ObjC++ Var(warn_deprecated) Init(1) Warning
+C C++ ObjC ObjC++ Var(warn_deprecated) Init(1) Warning
Warn about deprecated compiler features
Wdiv-by-zero
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 7248fd6a27c..e1d77758c3c 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -471,7 +471,9 @@ avr_regs_to_save (HARD_REG_SET *set)
int reg, count;
int int_or_sig_p = (interrupt_function_p (current_function_decl)
|| signal_function_p (current_function_decl));
- int leaf_func_p = leaf_function_p ();
+
+ if (!reload_completed)
+ cfun->machine->is_leaf = leaf_function_p ();
if (set)
CLEAR_HARD_REG_SET (*set);
@@ -490,7 +492,7 @@ avr_regs_to_save (HARD_REG_SET *set)
if (fixed_regs[reg])
continue;
- if ((int_or_sig_p && !leaf_func_p && call_used_regs[reg])
+ if ((int_or_sig_p && !cfun->machine->is_leaf && call_used_regs[reg])
|| (df_regs_ever_live_p (reg)
&& (int_or_sig_p || !call_used_regs[reg])
&& !(frame_pointer_needed
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 7dbc76ce9de..1f2ea7a9600 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -147,6 +147,8 @@ extern GTY(()) section *progmem_section;
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 8
+#define MAX_OFILE_ALIGNMENT (32768 * 8)
+
#define TARGET_VTABLE_ENTRY_ALIGN 8
#define STRICT_ALIGNMENT 0
@@ -1026,6 +1028,9 @@ mmcu=*:-mmcu=%*}"
This is added to the cfun structure. */
struct machine_function GTY(())
{
+ /* 'true' - if the current function is a leaf function. */
+ int is_leaf;
+
/* 'true' - if current function is a naked function. */
int is_naked;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4d6349ca081..0ebfb1b7617 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -17989,14 +17989,6 @@ static const struct builtin_description bdesc_comi[] =
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdneq", IX86_BUILTIN_UCOMINEQSD, LTGT, 0 },
};
-static const struct builtin_description bdesc_ptest[] =
-{
- /* SSE4.1 */
- { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestz128", IX86_BUILTIN_PTESTZ, EQ, 0 },
- { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestc128", IX86_BUILTIN_PTESTC, LTU, 0 },
- { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestnzc128", IX86_BUILTIN_PTESTNZC, GTU, 0 },
-};
-
static const struct builtin_description bdesc_pcmpestr[] =
{
/* SSE4.2 */
@@ -18048,6 +18040,7 @@ enum ix86_builtin_type
FLOAT128_FTYPE_FLOAT128,
FLOAT_FTYPE_FLOAT,
FLOAT128_FTYPE_FLOAT128_FLOAT128,
+ INT_FTYPE_V2DI_V2DI_PTEST,
INT64_FTYPE_V4SF,
INT64_FTYPE_V2DF,
INT_FTYPE_V16QI,
@@ -18655,6 +18648,10 @@ static const struct builtin_description bdesc_args[] =
{ OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_roundsd, "__builtin_ia32_roundsd", IX86_BUILTIN_ROUNDSD, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT },
{ OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_roundss, "__builtin_ia32_roundss", IX86_BUILTIN_ROUNDSS, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT },
+ { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestz128", IX86_BUILTIN_PTESTZ, EQ, (int) INT_FTYPE_V2DI_V2DI_PTEST },
+ { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestc128", IX86_BUILTIN_PTESTC, LTU, (int) INT_FTYPE_V2DI_V2DI_PTEST },
+ { OPTION_MASK_ISA_ROUND, CODE_FOR_sse4_1_ptest, "__builtin_ia32_ptestnzc128", IX86_BUILTIN_PTESTNZC, GTU, (int) INT_FTYPE_V2DI_V2DI_PTEST },
+
/* SSE4.2 */
{ OPTION_MASK_ISA_SSE4_2, CODE_FOR_sse4_2_gtv2di3, "__builtin_ia32_pcmpgtq", IX86_BUILTIN_PCMPGTQ, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI },
{ OPTION_MASK_ISA_SSE4_2, CODE_FOR_sse4_2_crc32qi, "__builtin_ia32_crc32qi", IX86_BUILTIN_CRC32QI, UNKNOWN, (int) UINT_FTYPE_UINT_UCHAR },
@@ -19597,6 +19594,9 @@ ix86_init_mmx_sse_builtins (void)
case FLOAT_FTYPE_FLOAT:
type = float_ftype_float;
break;
+ case INT_FTYPE_V2DI_V2DI_PTEST:
+ type = int_ftype_v2di_v2di;
+ break;
case INT64_FTYPE_V4SF:
type = int64_ftype_v4sf;
break;
@@ -19935,10 +19935,6 @@ ix86_init_mmx_sse_builtins (void)
else
def_builtin_const (d->mask, d->name, int_ftype_v4sf_v4sf, d->code);
- /* ptest insns. */
- for (i = 0, d = bdesc_ptest; i < ARRAY_SIZE (bdesc_ptest); i++, d++)
- def_builtin_const (d->mask, d->name, int_ftype_v2di_v2di, d->code);
-
/* SSE */
def_builtin (OPTION_MASK_ISA_SSE, "__builtin_ia32_ldmxcsr", void_ftype_unsigned, IX86_BUILTIN_LDMXCSR);
def_builtin (OPTION_MASK_ISA_SSE, "__builtin_ia32_stmxcsr", unsigned_ftype_void, IX86_BUILTIN_STMXCSR);
@@ -20451,6 +20447,302 @@ ix86_expand_sse_compare (const struct builtin_description *d,
return target;
}
+/* Subroutine of ix86_expand_builtin to take care of comi insns. */
+
+static rtx
+ix86_expand_sse_comi (const struct builtin_description *d, tree exp,
+ rtx target)
+{
+ rtx pat;
+ tree arg0 = CALL_EXPR_ARG (exp, 0);
+ tree arg1 = CALL_EXPR_ARG (exp, 1);
+ rtx op0 = expand_normal (arg0);
+ rtx op1 = expand_normal (arg1);
+ enum machine_mode mode0 = insn_data[d->icode].operand[0].mode;
+ enum machine_mode mode1 = insn_data[d->icode].operand[1].mode;
+ enum rtx_code comparison = d->comparison;
+
+ if (VECTOR_MODE_P (mode0))
+ op0 = safe_vector_operand (op0, mode0);
+ if (VECTOR_MODE_P (mode1))
+ op1 = safe_vector_operand (op1, mode1);
+
+ /* Swap operands if we have a comparison that isn't available in
+ hardware. */
+ if (d->flag & BUILTIN_DESC_SWAP_OPERANDS)
+ {
+ rtx tmp = op1;
+ op1 = op0;
+ op0 = tmp;
+ }
+
+ target = gen_reg_rtx (SImode);
+ emit_move_insn (target, const0_rtx);
+ target = gen_rtx_SUBREG (QImode, target, 0);
+
+ if ((optimize && !register_operand (op0, mode0))
+ || !(*insn_data[d->icode].operand[0].predicate) (op0, mode0))
+ op0 = copy_to_mode_reg (mode0, op0);
+ if ((optimize && !register_operand (op1, mode1))
+ || !(*insn_data[d->icode].operand[1].predicate) (op1, mode1))
+ op1 = copy_to_mode_reg (mode1, op1);
+
+ pat = GEN_FCN (d->icode) (op0, op1);
+ if (! pat)
+ return 0;
+ emit_insn (pat);
+ emit_insn (gen_rtx_SET (VOIDmode,
+ gen_rtx_STRICT_LOW_PART (VOIDmode, target),
+ gen_rtx_fmt_ee (comparison, QImode,
+ SET_DEST (pat),
+ const0_rtx)));
+
+ return SUBREG_REG (target);
+}
+
+/* Subroutine of ix86_expand_builtin to take care of ptest insns. */
+
+static rtx
+ix86_expand_sse_ptest (const struct builtin_description *d, tree exp,
+ rtx target)
+{
+ rtx pat;
+ tree arg0 = CALL_EXPR_ARG (exp, 0);
+ tree arg1 = CALL_EXPR_ARG (exp, 1);
+ rtx op0 = expand_normal (arg0);
+ rtx op1 = expand_normal (arg1);
+ enum machine_mode mode0 = insn_data[d->icode].operand[0].mode;
+ enum machine_mode mode1 = insn_data[d->icode].operand[1].mode;
+ enum rtx_code comparison = d->comparison;
+
+ if (VECTOR_MODE_P (mode0))
+ op0 = safe_vector_operand (op0, mode0);
+ if (VECTOR_MODE_P (mode1))
+ op1 = safe_vector_operand (op1, mode1);
+
+ target = gen_reg_rtx (SImode);
+ emit_move_insn (target, const0_rtx);
+ target = gen_rtx_SUBREG (QImode, target, 0);
+
+ if ((optimize && !register_operand (op0, mode0))
+ || !(*insn_data[d->icode].operand[0].predicate) (op0, mode0))
+ op0 = copy_to_mode_reg (mode0, op0);
+ if ((optimize && !register_operand (op1, mode1))
+ || !(*insn_data[d->icode].operand[1].predicate) (op1, mode1))
+ op1 = copy_to_mode_reg (mode1, op1);
+
+ pat = GEN_FCN (d->icode) (op0, op1);
+ if (! pat)
+ return 0;
+ emit_insn (pat);
+ emit_insn (gen_rtx_SET (VOIDmode,
+ gen_rtx_STRICT_LOW_PART (VOIDmode, target),
+ gen_rtx_fmt_ee (comparison, QImode,
+ SET_DEST (pat),
+ const0_rtx)));
+
+ return SUBREG_REG (target);
+}
+
+/* Subroutine of ix86_expand_builtin to take care of pcmpestr[im] insns. */
+
+static rtx
+ix86_expand_sse_pcmpestr (const struct builtin_description *d,
+ tree exp, rtx target)
+{
+ rtx pat;
+ tree arg0 = CALL_EXPR_ARG (exp, 0);
+ tree arg1 = CALL_EXPR_ARG (exp, 1);
+ tree arg2 = CALL_EXPR_ARG (exp, 2);
+ tree arg3 = CALL_EXPR_ARG (exp, 3);
+ tree arg4 = CALL_EXPR_ARG (exp, 4);
+ rtx scratch0, scratch1;
+ rtx op0 = expand_normal (arg0);
+ rtx op1 = expand_normal (arg1);
+ rtx op2 = expand_normal (arg2);
+ rtx op3 = expand_normal (arg3);
+ rtx op4 = expand_normal (arg4);
+ enum machine_mode tmode0, tmode1, modev2, modei3, modev4, modei5, modeimm;
+
+ tmode0 = insn_data[d->icode].operand[0].mode;
+ tmode1 = insn_data[d->icode].operand[1].mode;
+ modev2 = insn_data[d->icode].operand[2].mode;
+ modei3 = insn_data[d->icode].operand[3].mode;
+ modev4 = insn_data[d->icode].operand[4].mode;
+ modei5 = insn_data[d->icode].operand[5].mode;
+ modeimm = insn_data[d->icode].operand[6].mode;
+
+ if (VECTOR_MODE_P (modev2))
+ op0 = safe_vector_operand (op0, modev2);
+ if (VECTOR_MODE_P (modev4))
+ op2 = safe_vector_operand (op2, modev4);
+
+ if (! (*insn_data[d->icode].operand[2].predicate) (op0, modev2))
+ op0 = copy_to_mode_reg (modev2, op0);
+ if (! (*insn_data[d->icode].operand[3].predicate) (op1, modei3))
+ op1 = copy_to_mode_reg (modei3, op1);
+ if ((optimize && !register_operand (op2, modev4))
+ || !(*insn_data[d->icode].operand[4].predicate) (op2, modev4))
+ op2 = copy_to_mode_reg (modev4, op2);
+ if (! (*insn_data[d->icode].operand[5].predicate) (op3, modei5))
+ op3 = copy_to_mode_reg (modei5, op3);
+
+ if (! (*insn_data[d->icode].operand[6].predicate) (op4, modeimm))
+ {
+ error ("the fifth argument must be a 8-bit immediate");
+ return const0_rtx;
+ }
+
+ if (d->code == IX86_BUILTIN_PCMPESTRI128)
+ {
+ if (optimize || !target
+ || GET_MODE (target) != tmode0
+ || ! (*insn_data[d->icode].operand[0].predicate) (target, tmode0))
+ target = gen_reg_rtx (tmode0);
+
+ scratch1 = gen_reg_rtx (tmode1);
+
+ pat = GEN_FCN (d->icode) (target, scratch1, op0, op1, op2, op3, op4);
+ }
+ else if (d->code == IX86_BUILTIN_PCMPESTRM128)
+ {
+ if (optimize || !target
+ || GET_MODE (target) != tmode1
+ || ! (*insn_data[d->icode].operand[1].predicate) (target, tmode1))
+ target = gen_reg_rtx (tmode1);
+
+ scratch0 = gen_reg_rtx (tmode0);
+
+ pat = GEN_FCN (d->icode) (scratch0, target, op0, op1, op2, op3, op4);
+ }
+ else
+ {
+ gcc_assert (d->flag);
+
+ scratch0 = gen_reg_rtx (tmode0);
+ scratch1 = gen_reg_rtx (tmode1);
+
+ pat = GEN_FCN (d->icode) (scratch0, scratch1, op0, op1, op2, op3, op4);
+ }
+
+ if (! pat)
+ return 0;
+
+ emit_insn (pat);
+
+ if (d->flag)
+ {
+ target = gen_reg_rtx (SImode);
+ emit_move_insn (target, const0_rtx);
+ target = gen_rtx_SUBREG (QImode, target, 0);
+
+ emit_insn
+ (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target),
+ gen_rtx_fmt_ee (EQ, QImode,
+ gen_rtx_REG ((enum machine_mode) d->flag,
+ FLAGS_REG),
+ const0_rtx)));
+ return SUBREG_REG (target);
+ }
+ else
+ return target;
+}
+
+
+/* Subroutine of ix86_expand_builtin to take care of pcmpistr[im] insns. */
+
+static rtx
+ix86_expand_sse_pcmpistr (const struct builtin_description *d,
+ tree exp, rtx target)
+{
+ rtx pat;
+ tree arg0 = CALL_EXPR_ARG (exp, 0);
+ tree arg1 = CALL_EXPR_ARG (exp, 1);
+ tree arg2 = CALL_EXPR_ARG (exp, 2);
+ rtx scratch0, scratch1;
+ rtx op0 = expand_normal (arg0);
+ rtx op1 = expand_normal (arg1);
+ rtx op2 = expand_normal (arg2);
+ enum machine_mode tmode0, tmode1, modev2, modev3, modeimm;
+
+ tmode0 = insn_data[d->icode].operand[0].mode;
+ tmode1 = insn_data[d->icode].operand[1].mode;
+ modev2 = insn_data[d->icode].operand[2].mode;
+ modev3 = insn_data[d->icode].operand[3].mode;
+ modeimm = insn_data[d->icode].operand[4].mode;
+
+ if (VECTOR_MODE_P (modev2))
+ op0 = safe_vector_operand (op0, modev2);
+ if (VECTOR_MODE_P (modev3))
+ op1 = safe_vector_operand (op1, modev3);
+
+ if (! (*insn_data[d->icode].operand[2].predicate) (op0, modev2))
+ op0 = copy_to_mode_reg (modev2, op0);
+ if ((optimize && !register_operand (op1, modev3))
+ || !(*insn_data[d->icode].operand[3].predicate) (op1, modev3))
+ op1 = copy_to_mode_reg (modev3, op1);
+
+ if (! (*insn_data[d->icode].operand[4].predicate) (op2, modeimm))
+ {
+ error ("the third argument must be a 8-bit immediate");
+ return const0_rtx;
+ }
+
+ if (d->code == IX86_BUILTIN_PCMPISTRI128)
+ {
+ if (optimize || !target
+ || GET_MODE (target) != tmode0
+ || ! (*insn_data[d->icode].operand[0].predicate) (target, tmode0))
+ target = gen_reg_rtx (tmode0);
+
+ scratch1 = gen_reg_rtx (tmode1);
+
+ pat = GEN_FCN (d->icode) (target, scratch1, op0, op1, op2);
+ }
+ else if (d->code == IX86_BUILTIN_PCMPISTRM128)
+ {
+ if (optimize || !target
+ || GET_MODE (target) != tmode1
+ || ! (*insn_data[d->icode].operand[1].predicate) (target, tmode1))
+ target = gen_reg_rtx (tmode1);
+
+ scratch0 = gen_reg_rtx (tmode0);
+
+ pat = GEN_FCN (d->icode) (scratch0, target, op0, op1, op2);
+ }
+ else
+ {
+ gcc_assert (d->flag);
+
+ scratch0 = gen_reg_rtx (tmode0);
+ scratch1 = gen_reg_rtx (tmode1);
+
+ pat = GEN_FCN (d->icode) (scratch0, scratch1, op0, op1, op2);
+ }
+
+ if (! pat)
+ return 0;
+
+ emit_insn (pat);
+
+ if (d->flag)
+ {
+ target = gen_reg_rtx (SImode);
+ emit_move_insn (target, const0_rtx);
+ target = gen_rtx_SUBREG (QImode, target, 0);
+
+ emit_insn
+ (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target),
+ gen_rtx_fmt_ee (EQ, QImode,
+ gen_rtx_REG ((enum machine_mode) d->flag,
+ FLAGS_REG),
+ const0_rtx)));
+ return SUBREG_REG (target);
+ }
+ else
+ return target;
+}
+
/* Subroutine of ix86_expand_builtin to take care of insns with
variable number of operands. */
@@ -20477,6 +20769,8 @@ ix86_expand_args_builtin (const struct builtin_description *d,
switch ((enum ix86_builtin_type) d->flag)
{
+ case INT_FTYPE_V2DI_V2DI_PTEST:
+ return ix86_expand_sse_ptest (d, exp, target);
case FLOAT128_FTYPE_FLOAT128:
case FLOAT_FTYPE_FLOAT:
case INT64_FTYPE_V4SF:
@@ -20902,302 +21196,6 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
return class == store ? 0 : target;
}
-/* Subroutine of ix86_expand_builtin to take care of comi insns. */
-
-static rtx
-ix86_expand_sse_comi (const struct builtin_description *d, tree exp,
- rtx target)
-{
- rtx pat;
- tree arg0 = CALL_EXPR_ARG (exp, 0);
- tree arg1 = CALL_EXPR_ARG (exp, 1);
- rtx op0 = expand_normal (arg0);
- rtx op1 = expand_normal (arg1);
- enum machine_mode mode0 = insn_data[d->icode].operand[0].mode;
- enum machine_mode mode1 = insn_data[d->icode].operand[1].mode;
- enum rtx_code comparison = d->comparison;
-
- if (VECTOR_MODE_P (mode0))
- op0 = safe_vector_operand (op0, mode0);
- if (VECTOR_MODE_P (mode1))
- op1 = safe_vector_operand (op1, mode1);
-
- /* Swap operands if we have a comparison that isn't available in
- hardware. */
- if (d->flag & BUILTIN_DESC_SWAP_OPERANDS)
- {
- rtx tmp = op1;
- op1 = op0;
- op0 = tmp;
- }
-
- target = gen_reg_rtx (SImode);
- emit_move_insn (target, const0_rtx);
- target = gen_rtx_SUBREG (QImode, target, 0);
-
- if ((optimize && !register_operand (op0, mode0))
- || !(*insn_data[d->icode].operand[0].predicate) (op0, mode0))
- op0 = copy_to_mode_reg (mode0, op0);
- if ((optimize && !register_operand (op1, mode1))
- || !(*insn_data[d->icode].operand[1].predicate) (op1, mode1))
- op1 = copy_to_mode_reg (mode1, op1);
-
- pat = GEN_FCN (d->icode) (op0, op1);
- if (! pat)
- return 0;
- emit_insn (pat);
- emit_insn (gen_rtx_SET (VOIDmode,
- gen_rtx_STRICT_LOW_PART (VOIDmode, target),
- gen_rtx_fmt_ee (comparison, QImode,
- SET_DEST (pat),
- const0_rtx)));
-
- return SUBREG_REG (target);
-}
-
-/* Subroutine of ix86_expand_builtin to take care of ptest insns. */
-
-static rtx
-ix86_expand_sse_ptest (const struct builtin_description *d, tree exp,
- rtx target)
-{
- rtx pat;
- tree arg0 = CALL_EXPR_ARG (exp, 0);
- tree arg1 = CALL_EXPR_ARG (exp, 1);
- rtx op0 = expand_normal (arg0);
- rtx op1 = expand_normal (arg1);
- enum machine_mode mode0 = insn_data[d->icode].operand[0].mode;
- enum machine_mode mode1 = insn_data[d->icode].operand[1].mode;
- enum rtx_code comparison = d->comparison;
-
- if (VECTOR_MODE_P (mode0))
- op0 = safe_vector_operand (op0, mode0);
- if (VECTOR_MODE_P (mode1))
- op1 = safe_vector_operand (op1, mode1);
-
- target = gen_reg_rtx (SImode);
- emit_move_insn (target, const0_rtx);
- target = gen_rtx_SUBREG (QImode, target, 0);
-
- if ((optimize && !register_operand (op0, mode0))
- || !(*insn_data[d->icode].operand[0].predicate) (op0, mode0))
- op0 = copy_to_mode_reg (mode0, op0);
- if ((optimize && !register_operand (op1, mode1))
- || !(*insn_data[d->icode].operand[1].predicate) (op1, mode1))
- op1 = copy_to_mode_reg (mode1, op1);
-
- pat = GEN_FCN (d->icode) (op0, op1);
- if (! pat)
- return 0;
- emit_insn (pat);
- emit_insn (gen_rtx_SET (VOIDmode,
- gen_rtx_STRICT_LOW_PART (VOIDmode, target),
- gen_rtx_fmt_ee (comparison, QImode,
- SET_DEST (pat),
- const0_rtx)));
-
- return SUBREG_REG (target);
-}
-
-/* Subroutine of ix86_expand_builtin to take care of pcmpestr[im] insns. */
-
-static rtx
-ix86_expand_sse_pcmpestr (const struct builtin_description *d,
- tree exp, rtx target)
-{
- rtx pat;
- tree arg0 = CALL_EXPR_ARG (exp, 0);
- tree arg1 = CALL_EXPR_ARG (exp, 1);
- tree arg2 = CALL_EXPR_ARG (exp, 2);
- tree arg3 = CALL_EXPR_ARG (exp, 3);
- tree arg4 = CALL_EXPR_ARG (exp, 4);
- rtx scratch0, scratch1;
- rtx op0 = expand_normal (arg0);
- rtx op1 = expand_normal (arg1);
- rtx op2 = expand_normal (arg2);
- rtx op3 = expand_normal (arg3);
- rtx op4 = expand_normal (arg4);
- enum machine_mode tmode0, tmode1, modev2, modei3, modev4, modei5, modeimm;
-
- tmode0 = insn_data[d->icode].operand[0].mode;
- tmode1 = insn_data[d->icode].operand[1].mode;
- modev2 = insn_data[d->icode].operand[2].mode;
- modei3 = insn_data[d->icode].operand[3].mode;
- modev4 = insn_data[d->icode].operand[4].mode;
- modei5 = insn_data[d->icode].operand[5].mode;
- modeimm = insn_data[d->icode].operand[6].mode;
-
- if (VECTOR_MODE_P (modev2))
- op0 = safe_vector_operand (op0, modev2);
- if (VECTOR_MODE_P (modev4))
- op2 = safe_vector_operand (op2, modev4);
-
- if (! (*insn_data[d->icode].operand[2].predicate) (op0, modev2))
- op0 = copy_to_mode_reg (modev2, op0);
- if (! (*insn_data[d->icode].operand[3].predicate) (op1, modei3))
- op1 = copy_to_mode_reg (modei3, op1);
- if ((optimize && !register_operand (op2, modev4))
- || !(*insn_data[d->icode].operand[4].predicate) (op2, modev4))
- op2 = copy_to_mode_reg (modev4, op2);
- if (! (*insn_data[d->icode].operand[5].predicate) (op3, modei5))
- op3 = copy_to_mode_reg (modei5, op3);
-
- if (! (*insn_data[d->icode].operand[6].predicate) (op4, modeimm))
- {
- error ("the fifth argument must be a 8-bit immediate");
- return const0_rtx;
- }
-
- if (d->code == IX86_BUILTIN_PCMPESTRI128)
- {
- if (optimize || !target
- || GET_MODE (target) != tmode0
- || ! (*insn_data[d->icode].operand[0].predicate) (target, tmode0))
- target = gen_reg_rtx (tmode0);
-
- scratch1 = gen_reg_rtx (tmode1);
-
- pat = GEN_FCN (d->icode) (target, scratch1, op0, op1, op2, op3, op4);
- }
- else if (d->code == IX86_BUILTIN_PCMPESTRM128)
- {
- if (optimize || !target
- || GET_MODE (target) != tmode1
- || ! (*insn_data[d->icode].operand[1].predicate) (target, tmode1))
- target = gen_reg_rtx (tmode1);
-
- scratch0 = gen_reg_rtx (tmode0);
-
- pat = GEN_FCN (d->icode) (scratch0, target, op0, op1, op2, op3, op4);
- }
- else
- {
- gcc_assert (d->flag);
-
- scratch0 = gen_reg_rtx (tmode0);
- scratch1 = gen_reg_rtx (tmode1);
-
- pat = GEN_FCN (d->icode) (scratch0, scratch1, op0, op1, op2, op3, op4);
- }
-
- if (! pat)
- return 0;
-
- emit_insn (pat);
-
- if (d->flag)
- {
- target = gen_reg_rtx (SImode);
- emit_move_insn (target, const0_rtx);
- target = gen_rtx_SUBREG (QImode, target, 0);
-
- emit_insn
- (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target),
- gen_rtx_fmt_ee (EQ, QImode,
- gen_rtx_REG ((enum machine_mode) d->flag,
- FLAGS_REG),
- const0_rtx)));
- return SUBREG_REG (target);
- }
- else
- return target;
-}
-
-
-/* Subroutine of ix86_expand_builtin to take care of pcmpistr[im] insns. */
-
-static rtx
-ix86_expand_sse_pcmpistr (const struct builtin_description *d,
- tree exp, rtx target)
-{
- rtx pat;
- tree arg0 = CALL_EXPR_ARG (exp, 0);
- tree arg1 = CALL_EXPR_ARG (exp, 1);
- tree arg2 = CALL_EXPR_ARG (exp, 2);
- rtx scratch0, scratch1;
- rtx op0 = expand_normal (arg0);
- rtx op1 = expand_normal (arg1);
- rtx op2 = expand_normal (arg2);
- enum machine_mode tmode0, tmode1, modev2, modev3, modeimm;
-
- tmode0 = insn_data[d->icode].operand[0].mode;
- tmode1 = insn_data[d->icode].operand[1].mode;
- modev2 = insn_data[d->icode].operand[2].mode;
- modev3 = insn_data[d->icode].operand[3].mode;
- modeimm = insn_data[d->icode].operand[4].mode;
-
- if (VECTOR_MODE_P (modev2))
- op0 = safe_vector_operand (op0, modev2);
- if (VECTOR_MODE_P (modev3))
- op1 = safe_vector_operand (op1, modev3);
-
- if (! (*insn_data[d->icode].operand[2].predicate) (op0, modev2))
- op0 = copy_to_mode_reg (modev2, op0);
- if ((optimize && !register_operand (op1, modev3))
- || !(*insn_data[d->icode].operand[3].predicate) (op1, modev3))
- op1 = copy_to_mode_reg (modev3, op1);
-
- if (! (*insn_data[d->icode].operand[4].predicate) (op2, modeimm))
- {
- error ("the third argument must be a 8-bit immediate");
- return const0_rtx;
- }
-
- if (d->code == IX86_BUILTIN_PCMPISTRI128)
- {
- if (optimize || !target
- || GET_MODE (target) != tmode0
- || ! (*insn_data[d->icode].operand[0].predicate) (target, tmode0))
- target = gen_reg_rtx (tmode0);
-
- scratch1 = gen_reg_rtx (tmode1);
-
- pat = GEN_FCN (d->icode) (target, scratch1, op0, op1, op2);
- }
- else if (d->code == IX86_BUILTIN_PCMPISTRM128)
- {
- if (optimize || !target
- || GET_MODE (target) != tmode1
- || ! (*insn_data[d->icode].operand[1].predicate) (target, tmode1))
- target = gen_reg_rtx (tmode1);
-
- scratch0 = gen_reg_rtx (tmode0);
-
- pat = GEN_FCN (d->icode) (scratch0, target, op0, op1, op2);
- }
- else
- {
- gcc_assert (d->flag);
-
- scratch0 = gen_reg_rtx (tmode0);
- scratch1 = gen_reg_rtx (tmode1);
-
- pat = GEN_FCN (d->icode) (scratch0, scratch1, op0, op1, op2);
- }
-
- if (! pat)
- return 0;
-
- emit_insn (pat);
-
- if (d->flag)
- {
- target = gen_reg_rtx (SImode);
- emit_move_insn (target, const0_rtx);
- target = gen_rtx_SUBREG (QImode, target, 0);
-
- emit_insn
- (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target),
- gen_rtx_fmt_ee (EQ, QImode,
- gen_rtx_REG ((enum machine_mode) d->flag,
- FLAGS_REG),
- const0_rtx)));
- return SUBREG_REG (target);
- }
- else
- return target;
-}
-
/* Return the integer constant in ARG. Constrain it to be in the range
of the subparts of VEC_TYPE; issue an error if not. */
@@ -21486,10 +21484,6 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
if (d->code == fcode)
return ix86_expand_sse_comi (d, exp, target);
- for (i = 0, d = bdesc_ptest; i < ARRAY_SIZE (bdesc_ptest); i++, d++)
- if (d->code == fcode)
- return ix86_expand_sse_ptest (d, exp, target);
-
for (i = 0, d = bdesc_pcmpestr;
i < ARRAY_SIZE (bdesc_pcmpestr);
i++, d++)
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index d31aceb5d1b..983ffcf6c46 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -2253,7 +2253,7 @@
;; ??? In theory we can match memory for the MMX alternative, but allowing
;; nonimmediate_operand for operand 2 and *not* allowing memory for the SSE
;; alternatives pretty much forces the MMX alternative to be chosen.
-(define_insn "*sse_concatv2sf"
+(define_insn "*vec_concatv2sf_sse"
[(set (match_operand:V2SF 0 "register_operand" "=x,x,*y,*y")
(vec_concat:V2SF
(match_operand:SF 1 "nonimmediate_operand" " 0,m, 0, m")
@@ -2267,7 +2267,7 @@
[(set_attr "type" "sselog,ssemov,mmxcvt,mmxmov")
(set_attr "mode" "V4SF,SF,DI,DI")])
-(define_insn "*sse_concatv4sf"
+(define_insn "*vec_concatv4sf_sse"
[(set (match_operand:V4SF 0 "register_operand" "=x,x")
(vec_concat:V4SF
(match_operand:V2SF 1 "register_operand" " 0,0")
@@ -4726,10 +4726,22 @@
[(set_attr "type" "sselog1,ssemov")
(set_attr "mode" "TI,V4SF")])
+(define_insn "*vec_concatv2si_sse4_1"
+ [(set (match_operand:V2SI 0 "register_operand" "=x,x")
+ (vec_concat:V2SI
+ (match_operand:SI 1 "nonimmediate_operand" "0,rm")
+ (match_operand:SI 2 "nonimmediate_operand" "rm,0")))]
+ "TARGET_SSE4_1"
+ "@
+ pinsrd\t{$0x1, %2, %0|%0, %2, 0x1}
+ pinsrd\t{$0x0, %2, %0|%0, %2, 0x0}"
+ [(set_attr "type" "sselog")
+ (set_attr "mode" "TI")])
+
;; ??? In theory we can match memory for the MMX alternative, but allowing
;; nonimmediate_operand for operand 2 and *not* allowing memory for the SSE
;; alternatives pretty much forces the MMX alternative to be chosen.
-(define_insn "*sse2_concatv2si"
+(define_insn "*vec_concatv2si_sse2"
[(set (match_operand:V2SI 0 "register_operand" "=Y2, Y2,*y,*y")
(vec_concat:V2SI
(match_operand:SI 1 "nonimmediate_operand" " 0 ,rm , 0,rm")
@@ -4743,7 +4755,7 @@
[(set_attr "type" "sselog,ssemov,mmxcvt,mmxmov")
(set_attr "mode" "TI,TI,DI,DI")])
-(define_insn "*sse1_concatv2si"
+(define_insn "*vec_concatv2si_sse"
[(set (match_operand:V2SI 0 "register_operand" "=x,x,*y,*y")
(vec_concat:V2SI
(match_operand:SI 1 "nonimmediate_operand" " 0,m, 0,*rm")
@@ -4770,6 +4782,18 @@
[(set_attr "type" "sselog,ssemov,ssemov")
(set_attr "mode" "TI,V4SF,V2SF")])
+(define_insn "*vec_concatv2di_rex64_sse4_1"
+ [(set (match_operand:V2DI 0 "register_operand" "=x,x")
+ (vec_concat:V2DI
+ (match_operand:DI 1 "nonimmediate_operand" "0,rm")
+ (match_operand:DI 2 "nonimmediate_operand" "rm,0")))]
+ "TARGET_64BIT && TARGET_SSE4_1"
+ "@
+ pinsrq\t{$0x1, %2, %0|%0, %2, 0x1}
+ pinsrq\t{$0x0, %2, %0|%0, %2, 0x0}"
+ [(set_attr "type" "sselog")
+ (set_attr "mode" "TI")])
+
(define_insn "vec_concatv2di"
[(set (match_operand:V2DI 0 "register_operand" "=Y2,?Y2,Y2,x,x,x")
(vec_concat:V2DI
@@ -4786,7 +4810,7 @@
[(set_attr "type" "ssemov,ssemov,sselog,ssemov,ssemov,ssemov")
(set_attr "mode" "TI,TI,TI,V4SF,V2SF,V2SF")])
-(define_insn "*vec_concatv2di_rex"
+(define_insn "*vec_concatv2di_rex64"
[(set (match_operand:V2DI 0 "register_operand" "=Y2,Yi,!Y2,Y2,x,x,x")
(vec_concat:V2DI
(match_operand:DI 1 "nonimmediate_operand" " m,r ,*y ,0 ,0,0,m")
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index cd1013dfdc6..67301c969ad 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -6320,7 +6320,6 @@ sh_expand_prologue (void)
))
break;
insn = push (rn);
- RTX_FRAME_RELATED_P (insn) = 0;
}
}
}
diff --git a/gcc/configure b/gcc/configure
index 67e6b4bccc1..ff448b9f0b2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks'
# Initialize some variables set by options.
@@ -1087,8 +1087,8 @@ Optional Packages:
--with-build-sysroot=sysroot
use sysroot as the system root during the build
--with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
- --with-pkgversion=PKG Use PKG in the version string in place of "lto -
- merge rev. 135136"
+ --with-pkgversion=PKG Use PKG in the version string in place of "lto
+ merged with rev 135270"
--with-bugurl=URL Direct users to URL to report a bug
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
@@ -3071,6 +3071,202 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
CC="$am_aux_dir/compile $CC"
fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GNATBIND"; then
+ ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GNATBIND=$ac_cv_prog_GNATBIND
+if test -n "$GNATBIND"; then
+ echo "$as_me:$LINENO: result: $GNATBIND" >&5
+echo "${ECHO_T}$GNATBIND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_GNATBIND"; then
+ ac_ct_GNATBIND=$GNATBIND
+ # Extract the first word of "gnatbind", so it can be a program name with args.
+set dummy gnatbind; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_GNATBIND"; then
+ ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_GNATBIND="gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
+fi
+fi
+ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
+if test -n "$ac_ct_GNATBIND"; then
+ echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
+echo "${ECHO_T}$ac_ct_GNATBIND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ GNATBIND=$ac_ct_GNATBIND
+else
+ GNATBIND="$ac_cv_prog_GNATBIND"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GNATMAKE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GNATMAKE"; then
+ ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GNATMAKE=$ac_cv_prog_GNATMAKE
+if test -n "$GNATMAKE"; then
+ echo "$as_me:$LINENO: result: $GNATMAKE" >&5
+echo "${ECHO_T}$GNATMAKE" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_GNATMAKE"; then
+ ac_ct_GNATMAKE=$GNATMAKE
+ # Extract the first word of "gnatmake", so it can be a program name with args.
+set dummy gnatmake; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_GNATMAKE"; then
+ ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
+fi
+fi
+ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
+if test -n "$ac_ct_GNATMAKE"; then
+ echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
+echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ GNATMAKE=$ac_ct_GNATMAKE
+else
+ GNATMAKE="$ac_cv_prog_GNATMAKE"
+fi
+
+echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
+echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
+if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+acx_cv_cc_gcc_supports_ada=no
+# There is a bug in old released versions of GCC which causes the
+# driver to exit successfully when the appropriate language module
+# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
+# Therefore we must check for the error message as well as an
+# unsuccessful exit.
+# Other compilers, like HP Tru64 UNIX cc, exit successfully when
+# given a .adb file, but produce no object file. So we must check
+# if an object file was really produced to guard against this.
+errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
+if test x"$errors" = x && test -f conftest.$ac_objext; then
+ acx_cv_cc_gcc_supports_ada=yes
+fi
+rm -f conftest.*
+fi
+echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
+echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
+
+if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
+ have_gnat=yes
+else
+ have_gnat=no
+fi
+
+
# autoconf is lame and doesn't give us any substitution variable for this.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
@@ -7795,7 +7991,7 @@ echo "$as_me: error: package version not specified" >&2;}
*) PKGVERSION="($withval) " ;;
esac
else
- PKGVERSION="(lto - merge rev. 135136) "
+ PKGVERSION="(lto merged with rev 135270) "
fi;
@@ -14417,13 +14613,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14420: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:14616: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14423: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:14619: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14426: output\"" >&5)
+ (eval echo "\"\$as_me:14622: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -15478,7 +15674,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 15481 "configure"' > conftest.$ac_ext
+ echo '#line 15677 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16097,11 +16293,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16100: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16296: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16104: \$? = $ac_status" >&5
+ echo "$as_me:16300: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16419,11 +16615,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16422: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16618: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16426: \$? = $ac_status" >&5
+ echo "$as_me:16622: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16524,11 +16720,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16527: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16723: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16531: \$? = $ac_status" >&5
+ echo "$as_me:16727: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16579,11 +16775,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16582: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16778: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16586: \$? = $ac_status" >&5
+ echo "$as_me:16782: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19365,7 +19561,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19368 "configure"
+#line 19564 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19465,7 +19661,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19468 "configure"
+#line 19664 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -24196,6 +24392,10 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
+s,@GNATBIND@,$GNATBIND,;t t
+s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
+s,@GNATMAKE@,$GNATMAKE,;t t
+s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
s,@CPP@,$CPP,;t t
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 46ed345ab37..26f84734b90 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -276,6 +276,8 @@ rm -f a.out a.exe b.out
# Find the native compiler
AC_PROG_CC
AM_PROG_CC_C_O
+ACX_PROG_GNAT([-I"$srcdir"/ada])
+
# autoconf is lame and doesn't give us any substitution variable for this.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
@@ -769,7 +771,7 @@ esac],
[onestep=""])
AC_SUBST(onestep)
-ACX_PKGVERSION([lto - merge rev. 135136])
+ACX_PKGVERSION([lto merged with rev 135270])
ACX_BUGURL([http://gcc.gnu.org/bugs.html])
# Sanity check enable_languages in case someone does not run the toplevel
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 473db145650..49f91bab0cf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,17 +1,36 @@
-2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
+2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
- * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
- DECL_LOOPING_CONST_OR_PURE_P attributes.
- * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
- DECL_PURE_P.
+ PR c++/35331
+ * semantics.c (begin_class_definition): Extend checks on the first
+ argument.
+
+2008-05-12 Tomas Bily <tbily@suse.cz>
+
+ * typeck2.c (digest_init): Use CONVERT_EXPR_P.
+ * call.c (build_over_call): Likewise.
+ * error.c (dump_expr): Use CASE_CONVERT.
+ * class.c (fixed_type_or_null): Likewise.
+
+2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
+ in error message.
+ (cp_parser_omp_clause_schedule): Remove superfluous "expected"
+ in error message.
+
+2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
+ * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
+ DECL_LOOPING_CONST_OR_PURE_P attributes.
+ * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
+ DECL_PURE_P.
-2008-05-02 Simon Baldwin <simonb@google.com>
+2008-05-02 Simon Baldwin <simonb@google.com>
PR bootstrap/36108
* typeck.c (build_array_ref): Remove warn_array_subscript_range.
-2008-05-01 Simon Baldwin <simonb@google.com>
+2008-05-01 Simon Baldwin <simonb@google.com>
* typeck.c (build_array_ref): Call warn_array_subscript_range.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index c072a7df77f..b83ad3a2eef 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5119,9 +5119,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
/* Pull out the real argument, disregarding const-correctness. */
targ = arg;
- while (TREE_CODE (targ) == NOP_EXPR
- || TREE_CODE (targ) == NON_LVALUE_EXPR
- || TREE_CODE (targ) == CONVERT_EXPR)
+ while (CONVERT_EXPR_P (targ)
+ || TREE_CODE (targ) == NON_LVALUE_EXPR)
targ = TREE_OPERAND (targ, 0);
if (TREE_CODE (targ) == ADDR_EXPR)
{
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index dc29ff82767..6807e6b240e 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5411,8 +5411,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp)
return NULL_TREE;
- case NOP_EXPR:
- case CONVERT_EXPR:
+ CASE_CONVERT:
return RECUR (TREE_OPERAND (instance, 0));
case ADDR_EXPR:
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 9216a44aad6..55e620a6b54 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1747,8 +1747,7 @@ dump_expr (tree t, int flags)
dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS);
break;
- case NOP_EXPR:
- case CONVERT_EXPR:
+ CASE_CONVERT:
case VIEW_CONVERT_EXPR:
{
tree op = TREE_OPERAND (t, 0);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index a78e124a246..c3383e6441e 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -19814,8 +19814,8 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list)
code = TRUTH_ORIF_EXPR;
break;
default:
- cp_parser_error (parser, "%<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, "
- "%<&&%>, or %<||%>");
+ cp_parser_error (parser, "expected %<+%>, %<*%>, %<-%>, %<&%>, %<^%>, "
+ "%<|%>, %<&&%>, or %<||%>");
resync_fail:
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false,
@@ -19846,7 +19846,7 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list)
{
tree c, t;
- if (!cp_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
+ if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list;
c = build_omp_clause (OMP_CLAUSE_SCHEDULE);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 7881a9faf1b..192cfa64197 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2223,7 +2223,7 @@ check_template_template_default_arg (tree argument)
tree
begin_class_definition (tree t, tree attributes)
{
- if (t == error_mark_node)
+ if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t)))
return error_mark_node;
if (processing_template_parmlist)
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index c7339f1832d..c1fea0c0bed 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -713,7 +713,7 @@ digest_init (tree type, tree init)
/* Skip any conversions since we'll be outputting the underlying
constant. */
- while (TREE_CODE (*exp) == NOP_EXPR || TREE_CODE (*exp) == CONVERT_EXPR
+ while (CONVERT_EXPR_P (*exp)
|| TREE_CODE (*exp) == NON_LVALUE_EXPR)
exp = &TREE_OPERAND (*exp, 0);
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index b98aef2bd68..9e2f19ad0b5 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -111,6 +111,7 @@ Header Files
* Include Operation::
* Search Path::
* Once-Only Headers::
+* Alternatives to Wrapper #ifndef::
* Computed Includes::
* Wrapper Headers::
* System Headers::
@@ -168,8 +169,7 @@ Implementation Details
Obsolete Features
-* Assertions::
-* Obsolete once-only headers::
+* Obsolete Features::
@end detailmenu
@end menu
@@ -734,6 +734,7 @@ underscores in header file names, and at most one dot.
* Include Operation::
* Search Path::
* Once-Only Headers::
+* Alternatives to Wrapper #ifndef::
* Computed Includes::
* Wrapper Headers::
* System Headers::
@@ -959,6 +960,42 @@ begin with @samp{_}. In a system header file, it should begin with
file, the macro name should contain the name of the file and some
additional text, to avoid conflicts with other header files.
+@node Alternatives to Wrapper #ifndef
+@section Alternatives to Wrapper #ifndef
+
+CPP supports two more ways of indicating that a header file should be
+read only once. Neither one is as portable as a wrapper @samp{#ifndef}
+and we recommend you do not use them in new programs, with the caveat
+that @samp{#import} is standard practice in Objective-C.
+
+@findex #import
+CPP supports a variant of @samp{#include} called @samp{#import} which
+includes a file, but does so at most once. If you use @samp{#import}
+instead of @samp{#include}, then you don't need the conditionals
+inside the header file to prevent multiple inclusion of the contents.
+@samp{#import} is standard in Objective-C, but is considered a
+deprecated extension in C and C++.
+
+@samp{#import} is not a well designed feature. It requires the users of
+a header file to know that it should only be included once. It is much
+better for the header file's implementor to write the file so that users
+don't need to know this. Using a wrapper @samp{#ifndef} accomplishes
+this goal.
+
+In the present implementation, a single use of @samp{#import} will
+prevent the file from ever being read again, by either @samp{#import} or
+@samp{#include}. You should not rely on this; do not use both
+@samp{#import} and @samp{#include} to refer to the same header file.
+
+Another way to prevent a header file from being included more than once
+is with the @samp{#pragma once} directive. If @samp{#pragma once} is
+seen when scanning a header file, that file will never be read again, no
+matter what.
+
+@samp{#pragma once} does not have the problems that @samp{#import} does,
+but it is not recognized by all preprocessors, so you cannot rely on it
+in a portable program.
+
@node Computed Includes
@section Computed Includes
@cindex computed includes
@@ -3467,6 +3504,8 @@ These directives are not part of the C standard, but they are not
official GNU extensions either. What historical information we have
been able to find, suggests they originated with System V@.
+Both @samp{#ident} and @samp{#sccs} are deprecated extensions.
+
@cindex null directive
The @dfn{null directive} consists of a @samp{#} followed by a newline,
with only whitespace (including comments) in between. A null directive
@@ -4004,16 +4043,10 @@ may not be a limitation.
@node Obsolete Features
@section Obsolete Features
-CPP has a number of features which are present mainly for
-compatibility with older programs. We discourage their use in new code.
-In some cases, we plan to remove the feature in a future version of GCC@.
+CPP has some features which are present mainly for compatibility with
+older programs. We discourage their use in new code. In some cases,
+we plan to remove the feature in a future version of GCC@.
-@menu
-* Assertions::
-* Obsolete once-only headers::
-@end menu
-
-@node Assertions
@subsection Assertions
@cindex assertions
@@ -4097,42 +4130,6 @@ no effect.
You can also make or cancel assertions using command line options.
@xref{Invocation}.
-@node Obsolete once-only headers
-@subsection Obsolete once-only headers
-
-CPP supports two more ways of indicating that a header file should be
-read only once. Neither one is as portable as a wrapper @samp{#ifndef},
-and we recommend you do not use them in new programs.
-
-@findex #import
-In the Objective-C language, there is a variant of @samp{#include}
-called @samp{#import} which includes a file, but does so at most once.
-If you use @samp{#import} instead of @samp{#include}, then you don't
-need the conditionals inside the header file to prevent multiple
-inclusion of the contents. GCC permits the use of @samp{#import} in C
-and C++ as well as Objective-C@. However, it is not in standard C or C++
-and should therefore not be used by portable programs.
-
-@samp{#import} is not a well designed feature. It requires the users of
-a header file to know that it should only be included once. It is much
-better for the header file's implementor to write the file so that users
-don't need to know this. Using a wrapper @samp{#ifndef} accomplishes
-this goal.
-
-In the present implementation, a single use of @samp{#import} will
-prevent the file from ever being read again, by either @samp{#import} or
-@samp{#include}. You should not rely on this; do not use both
-@samp{#import} and @samp{#include} to refer to the same header file.
-
-Another way to prevent a header file from being included more than once
-is with the @samp{#pragma once} directive. If @samp{#pragma once} is
-seen when scanning a header file, that file will never be read again, no
-matter what.
-
-@samp{#pragma once} does not have the problems that @samp{#import} does,
-but it is not recognized by all preprocessors, so you cannot rely on it
-in a portable program.
-
@node Differences from previous versions
@section Differences from previous versions
@cindex differences from previous versions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index 4b02a87cb8e..0cdfa1b2f9a 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -1,4 +1,4 @@
-@c Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+@c Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
@c Free Software Foundation, Inc.
@c This is part of the CPP and GCC manuals.
@c For copying conditions, see the file gcc.texi.
@@ -633,7 +633,7 @@ Make an assertion with the predicate @var{predicate} and answer
@var{predicate}(@var{answer})}, which is still supported, because
it does not use shell special characters.
@ifset cppmanual
-@xref{Assertions}.
+@xref{Obsolete Features}.
@end ifset
@item -A -@var{predicate}=@var{answer}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c9fa4584f1c..430926f2da9 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -195,7 +195,7 @@ in the following sections.
-fvisibility-ms-compat @gol
-Wabi -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
--Weffc++ -Wno-deprecated -Wstrict-null-sentinel @gol
+-Weffc++ -Wstrict-null-sentinel @gol
-Wno-non-template-friend -Wold-style-cast @gol
-Woverloaded-virtual -Wno-pmf-conversions @gol
-Wsign-promo}
@@ -230,8 +230,8 @@ Objective-C and Objective-C++ Dialects}.
-w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol
-Wno-attributes -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
-Wchar-subscripts -Wclobbered -Wcomment @gol
--Wconversion -Wcoverage-mismatch -Wno-deprecated-declarations @gol
--Wdisabled-optimization -Wno-div-by-zero @gol
+-Wconversion -Wcoverage-mismatch -Wno-deprecated @gol
+-Wno-deprecated-declarations -Wdisabled-optimization -Wno-div-by-zero @gol
-Wempty-body -Wno-endif-labels @gol
-Werror -Werror=* @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
@@ -2119,11 +2119,6 @@ When selecting this option, be aware that the standard library
headers do not obey all of these guidelines; use @samp{grep -v}
to filter out those warnings.
-@item -Wno-deprecated @r{(C++ and Objective-C++ only)}
-@opindex Wno-deprecated
-@opindex Wdeprecated
-Do not warn about usage of deprecated features. @xref{Deprecated Features}.
-
@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)}
@opindex Wstrict-null-sentinel
@opindex Wno-strict-null-sentinel
@@ -3885,6 +3880,11 @@ confused with the digit 0, and so is not the default, but may be
useful as a local coding convention if the programming environment is
unable to be fixed to display these characters distinctly.
+@item -Wno-deprecated
+@opindex Wno-deprecated
+@opindex Wdeprecated
+Do not warn about usage of deprecated features. @xref{Deprecated Features}.
+
@item -Wno-deprecated-declarations
@opindex Wno-deprecated-declarations
@opindex Wdeprecated-declarations
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 358a6166f17..c167bc4f670 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -6831,7 +6831,8 @@ fold_sign_changed_comparison (enum tree_code code, tree type,
&& TREE_TYPE (TREE_OPERAND (arg1, 0)) == inner_type))
return NULL_TREE;
- if (TYPE_UNSIGNED (inner_type) != TYPE_UNSIGNED (outer_type)
+ if ((TYPE_UNSIGNED (inner_type) != TYPE_UNSIGNED (outer_type)
+ || POINTER_TYPE_P (inner_type) != POINTER_TYPE_P (outer_type))
&& code != NE_EXPR
&& code != EQ_EXPR)
return NULL_TREE;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e93c004d5ce..05563105cde 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,22 @@
+2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/36176
+ * target-memory.c (gfc_target_expr_size): Correctly treat
+ substrings.
+ (gfc_target_encode_expr): Likewise.
+ (gfc_interpret_complex): Whitespace change.
+
+2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/35719
+ * trans.c (gfc_call_malloc): If size equals zero, allocate one
+ byte; don't return a null pointer.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/36197
+ * module.c (quote_string): Fix sprintf format.
+
2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36162
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 2c3d88ac643..ef2faf7c882 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1502,7 +1502,7 @@ quote_string (const gfc_char_t *s, const size_t slength)
*q++ = '\\', *q++ = '\\';
else if (!gfc_wide_is_printable (*p))
{
- sprintf (q, "\\U%08" HOST_WIDE_INT_PRINT "ux",
+ sprintf (q, "\\U%08" HOST_WIDE_INT_PRINT "x",
(unsigned HOST_WIDE_INT) *p);
q += 10;
}
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index 149afa1e8ca..389e2a53917 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -100,7 +100,16 @@ gfc_target_expr_size (gfc_expr *e)
case BT_LOGICAL:
return size_logical (e->ts.kind);
case BT_CHARACTER:
- return size_character (e->value.character.length, e->ts.kind);
+ if (e->expr_type == EXPR_SUBSTRING && e->ref)
+ {
+ int start, end;
+
+ gfc_extract_int (e->ref->u.ss.start, &start);
+ gfc_extract_int (e->ref->u.ss.end, &end);
+ return size_character (MAX(end - start + 1, 0), e->ts.kind);
+ }
+ else
+ return size_character (e->value.character.length, e->ts.kind);
case BT_HOLLERITH:
return e->representation.length;
case BT_DERIVED:
@@ -231,7 +240,8 @@ gfc_target_encode_expr (gfc_expr *source, unsigned char *buffer,
return encode_array (source, buffer, buffer_size);
gcc_assert (source->expr_type == EXPR_CONSTANT
- || source->expr_type == EXPR_STRUCTURE);
+ || source->expr_type == EXPR_STRUCTURE
+ || source->expr_type == EXPR_SUBSTRING);
/* If we already have a target-memory representation, we use that rather
than recreating one. */
@@ -257,9 +267,24 @@ gfc_target_encode_expr (gfc_expr *source, unsigned char *buffer,
return encode_logical (source->ts.kind, source->value.logical, buffer,
buffer_size);
case BT_CHARACTER:
- return encode_character (source->ts.kind, source->value.character.length,
- source->value.character.string, buffer,
- buffer_size);
+ if (source->expr_type == EXPR_CONSTANT || source->ref == NULL)
+ return encode_character (source->ts.kind,
+ source->value.character.length,
+ source->value.character.string, buffer,
+ buffer_size);
+ else
+ {
+ int start, end;
+
+ gcc_assert (source->expr_type == EXPR_SUBSTRING);
+ gfc_extract_int (source->ref->u.ss.start, &start);
+ gfc_extract_int (source->ref->u.ss.end, &end);
+ return encode_character (source->ts.kind,
+ MAX(end - start + 1, 0),
+ &source->value.character.string[start-1],
+ buffer, buffer_size);
+ }
+
case BT_DERIVED:
return encode_derived (source, buffer, buffer_size);
default:
@@ -342,7 +367,8 @@ gfc_interpret_complex (int kind, unsigned char *buffer, size_t buffer_size,
{
int size;
size = gfc_interpret_float (kind, &buffer[0], buffer_size, real);
- size += gfc_interpret_float (kind, &buffer[size], buffer_size - size, imaginary);
+ size += gfc_interpret_float (kind, &buffer[size], buffer_size - size,
+ imaginary);
return size;
}
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index a9951e48c57..f303128a28d 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -440,12 +440,12 @@ gfc_trans_runtime_check (tree cond, stmtblock_t * pblock, locus * where,
/* Call malloc to allocate size bytes of memory, with special conditions:
+ if size < 0, generate a runtime error,
- + if size == 0, return a NULL pointer,
+ + if size == 0, return a malloced area of size 1,
+ if malloc returns NULL, issue a runtime error. */
tree
gfc_call_malloc (stmtblock_t * block, tree type, tree size)
{
- tree tmp, msg, negative, zero, malloc_result, null_result, res;
+ tree tmp, msg, negative, malloc_result, null_result, res;
stmtblock_t block2;
size = gfc_evaluate_now (size, block);
@@ -468,6 +468,10 @@ gfc_call_malloc (stmtblock_t * block, tree type, tree size)
/* Call malloc and check the result. */
gfc_start_block (&block2);
+
+ size = fold_build2 (MAX_EXPR, size_type_node, size,
+ build_int_cst (size_type_node, 1));
+
gfc_add_modify_expr (&block2, res,
build_call_expr (built_in_decls[BUILT_IN_MALLOC], 1,
size));
@@ -481,13 +485,7 @@ gfc_call_malloc (stmtblock_t * block, tree type, tree size)
gfc_add_expr_to_block (&block2, tmp);
malloc_result = gfc_finish_block (&block2);
- /* size == 0 */
- zero = fold_build2 (EQ_EXPR, boolean_type_node, size,
- build_int_cst (size_type_node, 0));
- tmp = fold_build2 (MODIFY_EXPR, pvoid_type_node, res,
- build_int_cst (pvoid_type_node, 0));
- tmp = fold_build3 (COND_EXPR, void_type_node, zero, tmp, malloc_result);
- gfc_add_expr_to_block (block, tmp);
+ gfc_add_expr_to_block (block, malloc_result);
if (type != NULL)
res = fold_convert (type, res);
diff --git a/gcc/gcse.c b/gcc/gcse.c
index e881e86764e..77efc44769b 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -5987,7 +5987,7 @@ store_killed_in_insn (const_rtx x, const_rtx x_regs, const_rtx insn, int after)
{
/* A normal or pure call might read from pattern,
but a const call will not. */
- if (RTL_CONST_CALL_P (insn))
+ if (!RTL_CONST_CALL_P (insn))
return true;
/* But even a const call reads its parameters. Check whether the
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index a3b2b0d48c3..2d0ecbf20d9 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3968,7 +3968,7 @@ gimplify_modify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
/* If we've somehow already got an SSA_NAME on the LHS, then
we're probably modified it twice. Not good. */
gcc_assert (TREE_CODE (*to_p) != SSA_NAME);
- *to_p = make_ssa_name (cfun, *to_p, *expr_p);
+ *to_p = make_ssa_name (*to_p, *expr_p);
}
/* Try to alleviate the effects of the gimplification creating artificial
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 411806af5a8..750e6716822 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
+
+ * jcf-dump.c (print_constant): Use
+ HOST_LONG_LONG_FORMAT.
+
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (java_init_decl_processing): Change DECL_IS_PURE to
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index 3cc996a9a60..7615f97b7f2 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -850,9 +850,11 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
if (dnum.mantissa0 == 0 && dnum.mantissa1 == 0)
fputs ("Inf", out);
else if (dnum.mantissa0 & JDOUBLE_QNAN_MASK)
- fprintf (out, "QNaN(%llu)", (unsigned long long)mantissa);
+ fprintf (out, "QNaN(%" HOST_LONG_LONG_FORMAT "u)",
+ (unsigned long long)mantissa);
else
- fprintf (out, "SNaN(%llu)", (unsigned long long)mantissa);
+ fprintf (out, "SNaN(%" HOST_LONG_LONG_FORMAT "u)",
+ (unsigned long long)mantissa);
}
if (verbosity > 1)
{
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 2b61fdc4f6f..dc656d3ef4e 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -1788,7 +1788,7 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest,
inc_stmt = build2 (PLUS_EXPR, type,
ivvar, build_int_cst (type, LL_STEP (newloop)));
inc_stmt = build_gimple_modify_stmt (SSA_NAME_VAR (ivvar), inc_stmt);
- ivvarinced = make_ssa_name (cfun, SSA_NAME_VAR (ivvar), inc_stmt);
+ ivvarinced = make_ssa_name (SSA_NAME_VAR (ivvar), inc_stmt);
GIMPLE_STMT_OPERAND (inc_stmt, 0) = ivvarinced;
bsi = bsi_for_stmt (exitcond);
bsi_insert_before (&bsi, inc_stmt, BSI_SAME_STMT);
@@ -2100,7 +2100,7 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x,
val = force_gimple_operand_bsi (firstbsi, val, false, NULL,
true, BSI_SAME_STMT);
setstmt = build_gimple_modify_stmt (var, val);
- var = make_ssa_name (cfun, var, setstmt);
+ var = make_ssa_name (var, setstmt);
GIMPLE_STMT_OPERAND (setstmt, 0) = var;
bsi_insert_before (firstbsi, setstmt, BSI_SAME_STMT);
update_stmt (setstmt);
@@ -2474,7 +2474,7 @@ perfect_nestify (struct loop *loop,
uboundvar = create_tmp_var (integer_type_node, "uboundvar");
add_referenced_var (uboundvar);
stmt = build_gimple_modify_stmt (uboundvar, VEC_index (tree, ubounds, 0));
- uboundvar = make_ssa_name (cfun, uboundvar, stmt);
+ uboundvar = make_ssa_name (uboundvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = uboundvar;
if (insert_after)
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index ba4805d95be..29fa8d9a374 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-13 Diego Novillo <dnovillo@google.com>
+
+ * lto-function-in.c (input_ssa_names): Call
+ make_ssa_name_fn instead of make_ssa_name.
+
2008-05-12 Diego Novillo <dnovillo@google.com>
* lto-cgraph-in.c (overwrite_node): Update references to
diff --git a/gcc/lto/lto-function-in.c b/gcc/lto/lto-function-in.c
index 3b19bd9ba07..2b70f1f0791 100644
--- a/gcc/lto/lto-function-in.c
+++ b/gcc/lto/lto-function-in.c
@@ -1434,7 +1434,7 @@ input_ssa_names (struct lto_input_block *ib, struct data_in *data_in, struct fun
VEC_quick_push (tree, SSANAMES (fn), NULL_TREE);
name = input_expr_operand (ib, data_in, fn, input_record_start (ib));
- ssa_name = make_ssa_name (fn, name, build_empty_stmt ());
+ ssa_name = make_ssa_name_fn (fn, name, build_empty_stmt ());
flags = input_tree_flags (ib, 0, true);
process_tree_flags (ssa_name, flags);
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 8173807b202..e77023400e0 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -1776,7 +1776,7 @@ transform_access_sites (void **slot, void *data ATTRIBUTE_UNUSED)
TREE_TYPE (GIMPLE_STMT_OPERAND
(acc_info->stmt, 0)), tmp,
conv);
- tmp = make_ssa_name (cfun, tmp, stmts);
+ tmp = make_ssa_name (tmp, stmts);
GIMPLE_STMT_OPERAND (stmts, 0) = tmp;
bsi = bsi_for_stmt (acc_info->stmt);
bsi_insert_after (&bsi, stmts, BSI_SAME_STMT);
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 02a1356b8cd..62fb91d6329 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12 Tomas Bily <tbily@suse.cz>
+
+ * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
+ Use CONVERT_EXPR_P.
+
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
* objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 46565e94b4f..b19821cf4ee 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -3164,8 +3164,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
outer = TREE_OPERAND (lhs, 0);
while (!strong_cast_p
- && (TREE_CODE (outer) == CONVERT_EXPR
- || TREE_CODE (outer) == NOP_EXPR
+ && (CONVERT_EXPR_P (outer)
|| TREE_CODE (outer) == NON_LVALUE_EXPR))
{
tree lhstype = TREE_TYPE (outer);
@@ -6267,8 +6266,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
rtype = receiver;
while (TREE_CODE (rtype) == COMPOUND_EXPR
|| TREE_CODE (rtype) == MODIFY_EXPR
- || TREE_CODE (rtype) == NOP_EXPR
- || TREE_CODE (rtype) == CONVERT_EXPR
+ || CONVERT_EXPR_P (rtype)
|| TREE_CODE (rtype) == COMPONENT_REF)
rtype = TREE_OPERAND (rtype, 0);
self = (rtype == self_decl);
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 39131eeb3bd..3f2ed91a068 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2250,9 +2250,9 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
tmp_var = create_tmp_var (TREE_TYPE (val), NULL);
if (gimple_in_ssa_p (cfun))
{
- tmp_then = make_ssa_name (cfun, tmp_var, NULL_TREE);
- tmp_else = make_ssa_name (cfun, tmp_var, NULL_TREE);
- tmp_join = make_ssa_name (cfun, tmp_var, NULL_TREE);
+ tmp_then = make_ssa_name (tmp_var, NULL_TREE);
+ tmp_else = make_ssa_name (tmp_var, NULL_TREE);
+ tmp_join = make_ssa_name (tmp_var, NULL_TREE);
}
else
{
@@ -2617,7 +2617,7 @@ expand_omp_parallel (struct omp_region *region)
definition of the argument. That should not be defined now,
since the argument is not used uninitialized. */
gcc_assert (gimple_default_def (cfun, arg) == NULL);
- narg = make_ssa_name (cfun, arg, build_empty_stmt ());
+ narg = make_ssa_name (arg, build_empty_stmt ());
set_default_def (arg, narg);
GIMPLE_STMT_OPERAND (parcopy_stmt, 1) = narg;
update_stmt (parcopy_stmt);
@@ -3183,9 +3183,9 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
if (gimple_in_ssa_p (cfun))
{
add_referenced_var (trip_var);
- trip_init = make_ssa_name (cfun, trip_var, NULL_TREE);
- trip_main = make_ssa_name (cfun, trip_var, NULL_TREE);
- trip_back = make_ssa_name (cfun, trip_var, NULL_TREE);
+ trip_init = make_ssa_name (trip_var, NULL_TREE);
+ trip_main = make_ssa_name (trip_var, NULL_TREE);
+ trip_back = make_ssa_name (trip_var, NULL_TREE);
}
else
{
@@ -3792,7 +3792,7 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
{
add_referenced_var (iaddr);
add_referenced_var (loadedi);
- loadedi = make_ssa_name (cfun, loadedi, NULL);
+ loadedi = make_ssa_name (loadedi, NULL);
}
}
else
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index f3b41a96778..79fe800018b 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -17,7 +17,7 @@
# <http://www.gnu.org/licenses/>.
# This Awk script reads in the option records generated from
-# opt-gather.awk, combines the flags of duplicat options and generates a
+# opt-gather.awk, combines the flags of duplicate options and generates a
# C file.
#
# This program uses functions from opt-functions.awk
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index a2a51884951..92ce6b27606 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-11 Joseph S. Myers <joseph@codesourcery.com>
+
+ * zh_CN.po: Update.
+
2008-05-07 Joseph S. Myers <joseph@codesourcery.com>
* sv.po: Update.
diff --git a/gcc/po/zh_CN.po b/gcc/po/zh_CN.po
index c1ea1150004..7fe3c9f1978 100644
--- a/gcc/po/zh_CN.po
+++ b/gcc/po/zh_CN.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: gcc 4.3.0\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2008-03-05 17:23+0100\n"
-"PO-Revision-Date: 2008-05-03 22:26+0800\n"
+"PO-Revision-Date: 2008-05-05 10:37+0800\n"
"Last-Translator: Meng Jie <zuxy.meng@gmail.com>\n"
"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -2704,7 +2704,7 @@ msgstr "考虑预防堆栈溢出的缓冲区的下é™å€¼"
#: params.def:645
msgid "Maximum number of statements allowed in a block that needs to be duplicated when threading jumps"
-msgstr ""
+msgstr "线索化跳转时一个以被å¤åˆ¶çš„å—中所能包å«çš„最大语å¥æ•°"
#: params.def:654
#, fuzzy
@@ -3739,7 +3739,7 @@ msgstr "%3$L处从 %1$s 到 %2$s 的转æ¢ä¸é€‚åˆæ•°ç»„æ“作数"
#: fortran/arith.c:2069
#, no-c-format
msgid "Integer outside symmetric range implied by Standard Fortran converting %s to %s at %L"
-msgstr ""
+msgstr "%3$L处将%1$s转æ¢ä¸º%2$s时整数超过了标准 Fortran 所规定的对称范围"
#: fortran/arith.c:2402
#, no-c-format
@@ -3985,9 +3985,9 @@ msgstr "当‘x’是 COMPLEX æ—¶%3$L处内建函数‘%2$s’的实å‚‘%1$sâ€
#: fortran/check.c:841 fortran/check.c:1199 fortran/check.c:1302
#: fortran/check.c:1461 fortran/check.c:1478 fortran/check.c:2312
#: fortran/check.c:2438 fortran/check.c:2773 fortran/check.c:2815
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: '%s' intrinsic with KIND argument at %L"
-msgstr "Fortran 2003:%C处的 FLUSH 语å¥"
+msgstr "Fortran 2003:%2$L处的‘%1$s’内建函数有 KIND 实å‚"
#: fortran/check.c:959 fortran/check.c:1706 fortran/check.c:1714
#, no-c-format
@@ -3997,7 +3997,7 @@ msgstr "%3$L处内建函数‘%2$s’的实å‚‘%1$s’必须为数字或 LOGIC
#: fortran/check.c:973
#, no-c-format
msgid "Different shape for arguments '%s' and '%s' at %L for intrinsic 'dot_product'"
-msgstr ""
+msgstr "%3$L处点乘内建函数的å‚数‘%1$s’和‘%2$s’外形ä¸ç›¸åŒ"
#: fortran/check.c:992 fortran/check.c:1000
#, no-c-format
@@ -4032,7 +4032,7 @@ msgstr "%3$L处内建函数‘%2$s’的实å‚‘a%1$d’必须是 %4$s(%5$d)"
#: fortran/check.c:1649
#, no-c-format
msgid "Fortran 2003: '%s' intrinsic with CHARACTER argument at %L"
-msgstr ""
+msgstr "Fortran 2003:%2$L处的‘%1$s’内建函数有 CHARACTER 实å‚"
#: fortran/check.c:1656
#, no-c-format
@@ -4042,12 +4042,12 @@ msgstr "%2$L处‘%1$s’内建函数的‘a1’实å‚必须是 INTEGERã€REAL æ
#: fortran/check.c:1728
#, no-c-format
msgid "Different shape on dimension 1 for arguments '%s' and '%s' at %L for intrinsic matmul"
-msgstr ""
+msgstr "%3$L处矩阵乘法的两个å‚数‘%1$s’和‘%2$s’第一维的外形ä¸ç›¸åŒ"
#: fortran/check.c:1747
#, no-c-format
msgid "Different shape on dimension 2 for argument '%s' and dimension 1 for argument '%s' at %L for intrinsic matmul"
-msgstr ""
+msgstr "用作%3$L处矩阵乘法å‚数的‘%1$s’的第二维和‘%2$s’的第一维的外形ä¸ç›¸åŒ"
#: fortran/check.c:1756
#, no-c-format
@@ -4813,19 +4813,19 @@ msgid "Syntax error in NAME= specifier for binding label at %C"
msgstr "%C CASE 指定语法错误"
#: fortran/decl.c:4832
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Missing closing quote '\"' for binding label at %C"
-msgstr "%C处缺少格å¼æ ‡å·"
+msgstr "%C处绑定标å·ç¼ºå°‘å³å¼•å·â€˜\"’"
#: fortran/decl.c:4841
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Missing closing quote ''' for binding label at %C"
-msgstr "%C处缺少格å¼æ ‡å·"
+msgstr "%C处绑定标å·ç¼ºå°‘å³å¼•å·â€˜'’"
#: fortran/decl.c:4851
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Missing closing paren for binding label at %C"
-msgstr "%C处缺少格å¼æ ‡å·"
+msgstr "%C处绑定标å·ç¼ºå°‘å³æ‹¬å·"
#: fortran/decl.c:4857
#, fuzzy, no-c-format
@@ -4979,9 +4979,9 @@ msgid "Expected expression at %C in PARAMETER statement"
msgstr "%C 在 PARAMETER 语å¥ä¸­éœ€è¦è¡¨è¾¾å¼"
#: fortran/decl.c:5799
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Initializing already initialized variable at %C"
-msgstr "COMMON å˜é‡â€˜%s’在%C处ä¸å…许有åˆå§‹å€¼è®¾å®š"
+msgstr "%C处åˆå§‹åŒ–å·²ç»åˆå§‹åŒ–çš„å˜é‡"
#: fortran/decl.c:5844
#, no-c-format
@@ -6468,9 +6468,9 @@ msgid "Pointer assignment with vector subscript on rhs at %L"
msgstr "%L处指针赋值的å³æ‰‹è¾¹å¸¦æœ‰çŸ¢é‡ä¸‹æ ‡"
#: fortran/expr.c:2972
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Pointer assigment target has PROTECTED attribute at %L"
-msgstr "%L处指针赋给éžæŒ‡é’ˆ"
+msgstr "%L处指针赋值对象有 PROTECTED 属性"
#: fortran/gfortranspec.c:248
#, c-format
@@ -6642,14 +6642,14 @@ msgid "Type/rank mismatch in argument '%s' at %L"
msgstr "%2$L处实å‚‘%1$s’类型/秩ä¸åŒ¹é…"
#: fortran/interface.c:1474
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Type mismatch in argument '%s' at %L; passed %s to %s"
-msgstr "实å‚‘%s’类型/秩ä¸åŒ¹é…,于%L处"
+msgstr "%2$L处实å‚‘%1$s’类型ä¸åŒ¹é…;将 %3$s 传递给 %4$s"
#: fortran/interface.c:1492 fortran/interface.c:1532
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Rank mismatch in argument '%s' at %L (%d and %d)"
-msgstr "实å‚‘%s’类型/秩ä¸åŒ¹é…,于%L处"
+msgstr "%2$L处实å‚‘%1$s’秩ä¸åŒ¹é…(%3$d å’Œ %4$d)"
#: fortran/interface.c:1519
#, fuzzy, no-c-format
@@ -6975,9 +6975,9 @@ msgid "Duplicate %s specification at %C"
msgstr "é‡å¤ %s 指定,于 %C"
#: fortran/io.c:1041
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Variable tag cannot be INTENT(IN) at %C"
-msgstr "循环å˜é‡â€˜%s’在%C处ä¸èƒ½æ˜¯ INTENT(IN)"
+msgstr "%C处的å˜é‡æ ‡è®°ä¸èƒ½æ˜¯ INTENT(IN)"
#: fortran/io.c:1048
#, no-c-format
@@ -7040,9 +7040,9 @@ msgid "Fortran 2003: IOMSG tag at %L"
msgstr "Fortran 2003:%L处的 IOMSG 标记"
#: fortran/io.c:1203
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 95 requires default INTEGER in %s tag at %L"
-msgstr "Fortran 95 在%L处的 SIZE 标记中需è¦é»˜è®¤çš„ INTEGER"
+msgstr "Fortran 95 在%2$L处的 %1$s 标记中需è¦é»˜è®¤çš„ INTEGER"
#: fortran/io.c:1211
#, no-c-format
@@ -7276,9 +7276,9 @@ msgid "Name at %C is too long"
msgstr "%C çš„å字太长"
#: fortran/match.c:568 fortran/match.c:614
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Invalid C name in NAME= specifier at %C"
-msgstr "%C处的格å¼é™å®šç¬¦éœ€è¦å¥ç‚¹"
+msgstr "%C处 NAME= é™å®šç¬¦ä¸­ C å字无效"
#: fortran/match.c:605
#, fuzzy, no-c-format
@@ -7391,9 +7391,9 @@ msgid "%s statement at %C leaving OpenMP structured block"
msgstr "%s 语å¥åœ¨%C处离开 OpenMP 结构å—"
#: fortran/match.c:1837
-#, fuzzy, no-c-format
+#, no-c-format
msgid "EXIT statement at %C terminating !$OMP DO loop"
-msgstr "%C处的 ENTRY 语å¥ä¸èƒ½å‡ºçŽ°åœ¨ DO 中"
+msgstr "%C处的 EXIT 语å¥ç»ˆç»“了 !$OMP DO 循环"
#: fortran/match.c:1889
#, no-c-format
@@ -8522,9 +8522,9 @@ msgid "Illegal character in BOZ constant at %C"
msgstr "%C处的 BOZ 常é‡ä¸­æœ‰éžæ³•å­—符"
#: fortran/primary.c:392
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Extension: BOZ constant at %C uses non-standard postfix syntax"
-msgstr "扩展:%C处的 BOZ 常é‡ä½¿ç”¨äº†éžæ ‡å‡†çš„中åºè¯­æ³•ã€‚"
+msgstr "扩展:%C处的 BOZ 常é‡ä½¿ç”¨äº†éžæ ‡å‡†çš„åŽåºè¯­æ³•ã€‚"
#: fortran/primary.c:423
#, no-c-format
@@ -8532,9 +8532,9 @@ msgid "Integer too big for integer kind %i at %C"
msgstr "%2$C处的整数对其ç§åˆ« %1$i æ¥è¯´å¤ªå¤§"
#: fortran/primary.c:429
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: BOZ used outside a DATA statement at %C"
-msgstr "Fortran 2003:%C处的 VOLATILE 语å¥"
+msgstr "Fortran 2003:%C处的 BOZ 用在了 DATA 语å¥ä¹‹å¤–"
#: fortran/primary.c:529
#, no-c-format
@@ -8852,9 +8852,9 @@ msgid "Derived type variable '%s' in COMMON at %L may not have default initializ
msgstr "外部对象‘%s’在%L处ä¸èƒ½æœ‰åˆå§‹å€¼è®¾å®š"
#: fortran/resolve.c:711
-#, fuzzy, no-c-format
+#, no-c-format
msgid "COMMON block '%s' at %L is used as PARAMETER at %L"
-msgstr "没有在%C处å‘现 COMMON å— /%s/"
+msgstr "%2$L处的 COMMON å—‘%1$s’在%3$L处被用作 PARAMETER"
#: fortran/resolve.c:715
#, no-c-format
@@ -8996,9 +8996,9 @@ msgid "Function '%s' at %L has no IMPLICIT type"
msgstr "%2$L处的函数‘%1$s’没有éšå¼ç±»åž‹"
#: fortran/resolve.c:1907
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument to '%s' at %L is not a variable"
-msgstr "%s 的实å‚在%L处类型无效"
+msgstr "%2$L处‘%1$s’的实å‚ä¸æ˜¯ä¸€ä¸ªå˜é‡"
#: fortran/resolve.c:1979
#, no-c-format
@@ -9156,9 +9156,9 @@ msgid "Shapes for operands at %L and %L are not conformable"
msgstr "%L å’Œ%L处的æ“作数外形ä¸ç›¸å®¹"
#: fortran/resolve.c:2916
-#, fuzzy, c-format
+#, c-format
msgid "Invalid context for NULL() pointer at %%L"
-msgstr "%s ç§åˆ«æ— æ•ˆï¼ŒäºŽ%L处"
+msgstr "%%L处 NULL() 指针上下文无效"
#: fortran/resolve.c:2932
#, c-format
@@ -9410,9 +9410,9 @@ msgid "Expression in DEALLOCATE statement at %L must be ALLOCATABLE or a POINTER
msgstr ""
#: fortran/resolve.c:4636
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Cannot deallocate INTENT(IN) variable '%s' at %L"
-msgstr "循环å˜é‡â€˜%s’在%C处ä¸èƒ½æ˜¯ INTENT(IN)"
+msgstr "ä¸èƒ½åœ¨%2$L处释放 INTENT(IN)å˜é‡â€˜%1$s’"
#: fortran/resolve.c:4740
#, no-c-format
@@ -9425,9 +9425,9 @@ msgid "Expression in ALLOCATE statement at %L must be ALLOCATABLE or a POINTER"
msgstr ""
#: fortran/resolve.c:4784
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Cannot allocate INTENT(IN) variable '%s' at %L"
-msgstr "循环å˜é‡â€˜%s’在%C处ä¸èƒ½æ˜¯ INTENT(IN)"
+msgstr "ä¸èƒ½åœ¨%2$Lå¤„åˆ†é… INTENT(IN)å˜é‡â€˜%1$s’"
#: fortran/resolve.c:4808
#, no-c-format
@@ -9567,9 +9567,9 @@ msgid "Label at %L is not in the same block as the GOTO statement at %L"
msgstr ""
#: fortran/resolve.c:5620 fortran/resolve.c:5634
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Deleted feature: GOTO at %L jumps to END of construct at %L"
-msgstr "已过时:%L处的 GOTO 跳转到%L处结构的 END"
+msgstr "已删除的特性:%L处的 GOTO 跳转到%L处结构的 END"
#: fortran/resolve.c:5711
#, no-c-format
@@ -9737,9 +9737,9 @@ msgstr "%L 指定了é‡å¤çš„ SAVE 属性"
#. The shape of a main program or module array needs to be
#. constant.
#: fortran/resolve.c:7121
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The module or main program array '%s' at %L must have constant shape"
-msgstr "å¯åˆ†é…的数组‘%s’在%L处必须有延迟的外形"
+msgstr "%2$L处的模å—或主程åºæ•°ç»„‘%1$s’必须有常é‡å¤–å½¢"
#: fortran/resolve.c:7134
#, no-c-format
@@ -10112,9 +10112,9 @@ msgid "Substring at %L has length zero"
msgstr "%L çš„å­å­—符串长度为零"
#: fortran/resolve.c:8941
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PUBLIC function '%s' at %L cannot be of PRIVATE type '%s'"
-msgstr "函数‘%s’在%L处没有 IMPLICIT 类型"
+msgstr "%2$L处的 PUBLIC 函数‘%1$s’ä¸èƒ½å…·æœ‰ PRIVATE 类型‘%3$s’"
#: fortran/resolve.c:8953
#, no-c-format
@@ -10860,9 +10860,9 @@ msgid "Unknown argument list function at %L"
msgstr "%L处å‚数列表函数未知"
#: fortran/trans-intrinsic.c:829
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'dim' argument of %s intrinsic at %L is not a valid dimension index"
-msgstr "‘%s’内建函数的‘dim’实å‚(于%L处)ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„维数索引"
+msgstr "%2$L处‘%1$s’内建函数的‘dim’实å‚ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„维数索引"
#: fortran/trans-io.c:1851
#, no-c-format
@@ -18647,7 +18647,7 @@ msgstr "ISO C90 ä¸æ”¯æŒ%<long long%>"
#: c-decl.c:7230 c-decl.c:7259
#, gcc-internal-format
msgid "both %<long%> and %<short%> in declaration specifiers"
-msgstr "声明中åŒæ—¶ä½¿ç”¨äº† %<long%>å’Œ%<short%>"
+msgstr "声明中åŒæ—¶ä½¿ç”¨äº†%<long%>å’Œ%<short%>"
#: c-decl.c:7233 c-decl.c:7436
#, gcc-internal-format
@@ -23844,12 +23844,12 @@ msgstr "%H数组下标越界"
#: tree-vrp.c:4398
#, gcc-internal-format
msgid "%Harray subscript is above array bounds"
-msgstr "%H数组下标å°äºŽä¸‹é™"
+msgstr "%H数组下标超过上é™"
#: tree-vrp.c:4405
#, gcc-internal-format
msgid "%Harray subscript is below array bounds"
-msgstr "%H数组下标大于上é™"
+msgstr "%H数组下标低于下é™"
#: tree-vrp.c:5058
#, gcc-internal-format
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
index c4de15dc21a..35dca7ca68c 100644
--- a/gcc/pretty-print.c
+++ b/gcc/pretty-print.c
@@ -50,7 +50,7 @@ along with GCC; see the file COPYING3. If not see
break; \
\
case 2: \
- pp_scalar (PP, "%ll" F, va_arg (ARG, long long T)); \
+ pp_scalar (PP, "%" HOST_LONG_LONG_FORMAT F, va_arg (ARG, long long T)); \
break; \
\
default: \
diff --git a/gcc/recog.c b/gcc/recog.c
index 7303b2a86f3..91e4e999d6c 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -589,11 +589,11 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object)
if (SWAPPABLE_OPERANDS_P (x)
&& swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
{
- validate_change (object, loc,
- gen_rtx_fmt_ee (COMMUTATIVE_ARITH_P (x) ? code
- : swap_condition (code),
- GET_MODE (x), XEXP (x, 1),
- XEXP (x, 0)), 1);
+ validate_unshare_change (object, loc,
+ gen_rtx_fmt_ee (COMMUTATIVE_ARITH_P (x) ? code
+ : swap_condition (code),
+ GET_MODE (x), XEXP (x, 1),
+ XEXP (x, 0)), 1);
x = *loc;
code = GET_CODE (x);
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 84952274dc8..cc85d14985f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,163 @@
+2008-05-13 Janis Johnson <janis187@us.ibm.com>
+
+ PR testsuite/35127
+ * gcc.c-torture/compile/20031125-1.c: Remove dg-do, dg-options.
+ * gcc.c-torture/compile/20031125-2.c: Ditto.
+ * gcc.c-torture/compile/20031203-1.c: Ditto.
+ * gcc.c-torture/compile/acc1.c: Remove -O2 from dg-options.
+ * gcc.c-torture/compile/builtin_constant_p.c: Remove dg-options.
+ * gcc.c-torture/compile/pr21562.c: Remove -O3 from dg-options.
+ * gcc.c-torture/compile/pr25483.c: Remove -O from dg-options.
+ * gcc.c-torture/compile/pr32349.c: Remove -O2 from dg-options.
+ * gcc.c-torture/compile/pr32355.c: Remove dg-options.
+ * gcc.c-torture/compile/pr34448.c: Ditto.
+ * gcc.c-torture/compile/pr34648.c: Remove -O2 from dg-options.
+
+2008-05-13 Tom Tromey <tromey@redhat.com>
+
+ PR preprocessor/22168:
+ * gcc.dg/pch/import-2.hs: Add -Wno-deprecated.
+ * gcc.dg/pch/import-1.hs: Add -Wno-deprecated.
+ * gcc.dg/pch/import-2.c: Add -Wno-deprecated.
+ * gcc.dg/pch/import-1.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/import2.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/import1.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/trad/assert3.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/trad/assert2.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/trad/assert1.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/ident.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/ident-1.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/extratokens.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/assert3.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/assert2.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/assert1.c: Add -Wno-deprecated.
+ * gcc.dg/cpp/assert4.c: Compile with -ansi and not -pedantic. Add
+ -Wno-deprecated.
+ * gcc.dg/cpp/pr22168.c: New file.
+ * gcc.dg/cpp/pr22168-2.c: New file.
+
+2008-05-13 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/36227
+ * gcc.dg/pr36227.c: New testcase.
+
+2008-05-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr7.adb: New test
+ * gnat.dg/conv_integer.adb: Likewise.
+
+2008-05-12 Janis Johnson <janis187@us.ibm.com>
+
+ * gcc.c-torture/compile/pr11832.c: XFAIL for mips and powerpc-linux,
+ then ignore ICE message to avoid a second failure.
+ * gcc.c-torture/compile/pr33009.c: Ditto.
+ * lib/gcc-dg.exp: Explain in comment how to XFAIL an ICE.
+
+2008-05-12 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ * gcc.dg/pr34457-1.c: Skip for target without trampolines.
+ * gcc.dg/20050607-1.c: Ditto.
+ * gcc.dg/trampoline-1.c: Ditto.
+ * gcc.dg/debug/debug-3.c: Ditto.
+ * gcc.dg/debug/debug-5.c: Ditto.
+
+2008-05-12 Samuel Tardieu <sam@rfc1149.net>
+
+ * gnat.dg/specs/statically_matching.ads: New.
+
+2008-05-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sse2-set-epi32-1.c: New.
+ * gcc.target/i386/sse2-set-epi64x-1.c: Likewise.
+ * gcc.target/i386/sse4_1-set-epi32-1.c: Likewise.
+ * gcc.target/i386/sse4_1-set-epi64x-1.c: Likewise.
+
+2008-05-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/36111
+ * gcc.dg/pr36111.c: New test.
+
+2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/36176
+ * gfortran.dg/transfer_simplify_9.f90: New test.
+
+2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/35331
+ * g++.dg/cpp0x/vt-35331.C: New.
+ * g++.dg/cpp0x/pr32125.C: Adjust.
+ * g++.dg/cpp0x/pr32126.C: Likewise.
+ * g++.dg/cpp0x/pr31438.C: Likewise.
+ * g++.dg/cpp0x/variadic81.C: Likewise.
+ * g++.dg/cpp0x/vt-34055.C: Likewise.
+ * g++.dg/cpp0x/vt-34606.C: Likewise.
+
+2008-05-12 Ira Rosen <irar@il.ibm.com>
+
+ * gfortran.dg/vect/pr36119.f: Rename to ...
+ * gfortran.dg/vect/O3-pr36119.f90: ... this. Compile for all targets
+ with -O3.
+
+2008-05-11 Adam Nemet <anemet@caviumnetworks.com>
+
+ * gcc.target/mips/mips.exp: Move passing -DMIPS16=... from here ...
+ * lib/target-supports.exp (add_options_for_mips16_attribute):
+ ... to here.
+
+2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/35719
+ * gfortran.dg/associated_5.f90: New test.
+
+2008-05-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/scc-1.c: Require mips16_attribute, and add
+ the associated options.
+ * gcc.target/mips/scc-3.c: Likewise.
+
+2008-05-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/default_format_1.f90: Move denormals tests to
+ gfortran.dg/default_format_denormal_1.f90.
+ * gfortran.dg/default_format_denormal_1.f90: Added denormal tests.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/nint_2.f90: XFAIL on mingw.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/streamio_15.f90: Take care of Windows CRLF line
+ terminator.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/fseek.f90: Take care of Windows CRLF line
+ terminator.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/fmt_t_5.f90: Take care of Windows CRLF line
+ terminator.
+
+2008-05-10 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR rtl-optimization/36185
+ * g++.dg/opt/pr36185.C
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * write_to_null.f90: Rename to write_to_null.F90.
+ * write_to_null.F90: On Windows, "nul" is the equivalent of the
+ Unix /dev/null.
+
+2008-05-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR rtl-optimization/33642
+ * gcc.c-torture/compile/pr11832.c: Skip for MIPS.
+ * gcc.c-torture/compile/pr33009.c: Likewise.
+
2008-05-09 Tom Tromey <tromey@redhat.com>
* gcc.dg/pr22231.c: Fix dg-error call.
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31438.C b/gcc/testsuite/g++.dg/cpp0x/pr31438.C
index 4763918b0ef..74738830ad1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31438.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31438.C
@@ -2,8 +2,8 @@
template<typename> struct A;
template<typename T, typename... U> struct A<T(U)> // { dg-error "parameter packs|U" }
-{ // { dg-error "parameter packs|U" }
- template<typename X> A(X); // { dg-error "parameter packs|U" }
+{
+ template<typename X> A(X);
};
A<void(int)> a(0); // { dg-error "incomplete type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32125.C b/gcc/testsuite/g++.dg/cpp0x/pr32125.C
index 048cf454484..210a29c0829 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32125.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32125.C
@@ -2,7 +2,7 @@
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
-{ // { dg-error "not expanded|T" }
- A(); // { dg-error "not expanded|T" }
- A(T); // { dg-error "not expanded|T" }
+{
+ A();
+ A(T);
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32126.C b/gcc/testsuite/g++.dg/cpp0x/pr32126.C
index a344567dff9..c525cca684b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32126.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32126.C
@@ -2,7 +2,7 @@
template<typename...> struct A;
template<typename...T> struct A<T> // { dg-error "not expanded|T|" }
-{ // { dg-error "not expanded|T|" }
+{
static int i;
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic81.C b/gcc/testsuite/g++.dg/cpp0x/variadic81.C
index c5673789ca9..cce61b31649 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic81.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic81.C
@@ -4,7 +4,7 @@
template<typename> struct A;
template<typename... T> struct A<T*> // { dg-error "not expanded|T|not used|T" }
-{ // { dg-error "not expanded|T|not used|T" }
+{
struct B;
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34055.C b/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
index 29066b50bd7..c50778430e0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
@@ -3,8 +3,8 @@
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T|candidate" }
+{
+ void foo();
};
template<typename...T> void A<T*>::foo() {} // { dg-error "invalid declarator" }
@@ -14,8 +14,8 @@ template<typename...T> void A<T*>::foo() {} // { dg-error "invalid declarator" }
template<typename...> struct B;
template<typename...T> struct B<T&> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T" }
+{
+ void foo();
};
template<typename...T> void B<T&>::foo() {} // { dg-error "invalid declarator" }
@@ -24,8 +24,8 @@ template<typename...T> void B<T&>::foo() {} // { dg-error "invalid declarator" }
template<typename...> struct C;
template<typename...T> struct C<T()> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T" }
+{
+ void foo();
};
template<typename...T> void C<T()>::foo() {} // { dg-error "invalid declarator" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34606.C b/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
index f62e2d54118..46794335442 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
@@ -2,8 +2,8 @@
template<typename...> struct A;
template<typename T, typename... U> struct A<T, U> // { dg-error "parameter packs|U" }
-{ // { dg-error "parameter packs|U" }
+{
template<typename> struct B;
- template<typename X> struct B<X*> {}; // { dg-error "parameter packs|U" }
+ template<typename X> struct B<X*> {};
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35331.C b/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
new file mode 100644
index 00000000000..0add9819bd0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
@@ -0,0 +1,7 @@
+// { dg-options "-std=c++0x" }
+template<typename...> struct A;
+
+template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
+{
+ friend void foo();
+};
diff --git a/gcc/testsuite/g++.dg/opt/pr36185.C b/gcc/testsuite/g++.dg/opt/pr36185.C
new file mode 100644
index 00000000000..2ffa52f8e86
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr36185.C
@@ -0,0 +1,24 @@
+// PR rtl-optimization/36185
+// { dg-do run }
+// { dg-options "-O2 -fgcse-sm" }
+
+struct Base {
+ virtual ~Base() {}
+ virtual void f() = 0;
+};
+struct Derived : Base {
+ Derived();
+ virtual void f() {}
+};
+struct Foo {
+ Foo(Base&);
+};
+Derived::Derived() {
+ Foo foo(*this);
+}
+Foo::Foo(Base& base) {
+ base.f();
+}
+int main() {
+ Derived d;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031125-1.c b/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
index 735a20bc241..d3e92679c8b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
@@ -1,5 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
short *_offsetTable;
/* This tests to make sure PRE splits the entry block ->block 0 edge
when there are multiple block 0 predecessors.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031125-2.c b/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
index 2af8a021175..42b72480e6a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
@@ -1,5 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
struct BlobSpan {
int right;
};
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031203-1.c b/gcc/testsuite/gcc.c-torture/compile/20031203-1.c
index 7827eb9066f..70547fdfe52 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031203-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031203-1.c
@@ -1,5 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
void make_file_symbol_completion_list (char *);
/* This tests to make sure PRE doesn't choose the wrong name when
inserting phi nodes. Otherwise, we get uses that aren't dominated
diff --git a/gcc/testsuite/gcc.c-torture/compile/acc1.c b/gcc/testsuite/gcc.c-torture/compile/acc1.c
index 206d16b8ce8..5b5bcd42d1f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/acc1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/acc1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -ffast-math" } */
+/* { dg-options "-ffast-math" } */
/* Fast maths allows tail recursion to be turned into iteration. */
diff --git a/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c b/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c
index fdfe3e0da6d..8b18c8af5b4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c
+++ b/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c
@@ -1,5 +1,3 @@
-/* { dg-options "-O2" } */
-
int main (int argc, char *argv[])
{
static int a[] = { __builtin_constant_p (argc) ? 1 : 0 };
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr11832.c b/gcc/testsuite/gcc.c-torture/compile/pr11832.c
index a4c3eece2b6..4eba49f0645 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr11832.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr11832.c
@@ -1,4 +1,7 @@
/* { dg-do compile } */
+/* Currently ICEs for MIPS and PowerPC; see PR33642. */
+/* { dg-xfail-if "PR33642" { mips*-*-* powerpc*-*-linux* } { "*" } { "" } } */
+/* { dg-prune-output ".*internal compiler error.*" }
/* { dg-options "-frtl-abstract-sequences" } */
int a, b, e;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21562.c b/gcc/testsuite/gcc.c-torture/compile/pr21562.c
index d100b28dd45..9b4932f8fb5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr21562.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr21562.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -fno-inline" } */
+/* { dg-options "-fno-inline" } */
struct foo { int a, b, c; };
void abort(void);
void exit(int);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25483.c b/gcc/testsuite/gcc.c-torture/compile/pr25483.c
index c5b7ed81371..99151fda0b3 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr25483.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr25483.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -fmove-loop-invariants" } */
+/* { dg-options "-fmove-loop-invariants" } */
static int mdct_win[8];
int x;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32349.c b/gcc/testsuite/gcc.c-torture/compile/pr32349.c
index 570969dfdfb..df725afbf9e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr32349.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32349.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fmodulo-sched" } */
+/* { dg-options "-fmodulo-sched" } */
extern long *x1, *x2, *x3;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32355.c b/gcc/testsuite/gcc.c-torture/compile/pr32355.c
index 126412d30bc..e88cf5cf79c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr32355.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32355.c
@@ -1,5 +1,3 @@
-/* { dg-options "-O3" } */
-
typedef struct
{
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr33009.c b/gcc/testsuite/gcc.c-torture/compile/pr33009.c
index 781e1fe001e..811fdb5f844 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr33009.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr33009.c
@@ -1,4 +1,7 @@
/* { dg-do compile } */
+/* Currently ICEs for MIPS and PowerPC; see PR33642. */
+/* { dg-xfail-if "PR33642" { mips*-*-* powerpc*-*-linux* } { "*" } { "" } } */
+/* { dg-prune-output ".*internal compiler error.*" }
/* { dg-options "-frtl-abstract-sequences" } */
char *progName;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34448.c b/gcc/testsuite/gcc.c-torture/compile/pr34448.c
index 988465efe74..625f6f8cc55 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34448.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34448.c
@@ -1,6 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "-O" } */
-
typedef struct chunk_t chunk_t;
struct chunk_t
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34648.c b/gcc/testsuite/gcc.c-torture/compile/pr34648.c
index 1f7472fe76d..8bcdae0501a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34648.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34648.c
@@ -1,7 +1,6 @@
/* PR tree-optimization/34648 */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fexceptions" } */
+/* { dg-options "-fexceptions" } */
extern const unsigned short int **bar (void) __attribute__ ((const));
const char *a;
diff --git a/gcc/testsuite/gcc.dg/20050607-1.c b/gcc/testsuite/gcc.dg/20050607-1.c
index 18cbf45919c..83c09674804 100644
--- a/gcc/testsuite/gcc.dg/20050607-1.c
+++ b/gcc/testsuite/gcc.dg/20050607-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target trampolines } */
/* { dg-options "-Wpadded" }
/* The struct internally constructed for the nested function should
not result in a warning from -Wpadded. */
diff --git a/gcc/testsuite/gcc.dg/cpp/assert1.c b/gcc/testsuite/gcc.dg/cpp/assert1.c
index ff7cc620bec..d1446105c54 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert1.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert1.c
@@ -1,6 +1,6 @@
/* Basic tests of the #assert preprocessor extension. */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-deprecated" } */
#define def unused expansion
#define fail int fail
diff --git a/gcc/testsuite/gcc.dg/cpp/assert2.c b/gcc/testsuite/gcc.dg/cpp/assert2.c
index bdbf85d2998..130f7f5320a 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert2.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert2.c
@@ -1,6 +1,6 @@
/* Malformed assertion tests. */
/* { dg-do preprocess } */
-/* { dg-options "-fno-show-column" } */
+/* { dg-options "-fno-show-column -Wno-deprecated" } */
#assert /* { dg-error "without predicate" "assert w/o predicate" } */
#assert % /* { dg-error "an identifier" "assert punctuation" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/assert3.c b/gcc/testsuite/gcc.dg/cpp/assert3.c
index df9b19fdaf9..9010ecebd4e 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert3.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert3.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
+/* Copyright (C) 2000, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-A abc=def -A abc\(ghi\) \"-Aabc = jkl\" -A abc=mno -A -abc=mno" } */
+/* { dg-options "-A abc=def -A abc\(ghi\) \"-Aabc = jkl\" -A abc=mno -A -abc=mno -Wno-deprecated" } */
/* Test -A command line syntax. Source Neil Booth. 31 Oct 2000. */
diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c
index f03d89fbadf..c43ba2fae96 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert4.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert4.c
@@ -1,8 +1,9 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
Test builtin preprocessor assertions.
By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
/* { dg-do preprocess } */
+/* { dg-options "-ansi -Wno-deprecated" } */
/* Check for #system assertions. */
diff --git a/gcc/testsuite/gcc.dg/cpp/extratokens.c b/gcc/testsuite/gcc.dg/cpp/extratokens.c
index ffbe7df3c51..d3e941bfff0 100644
--- a/gcc/testsuite/gcc.dg/cpp/extratokens.c
+++ b/gcc/testsuite/gcc.dg/cpp/extratokens.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
+/* Copyright (C) 2000, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-fno-show-column" } */
+/* { dg-options "-fno-show-column -Wno-deprecated" } */
/* Tests all directives that do not permit excess tokens at the end of
the line. */
diff --git a/gcc/testsuite/gcc.dg/cpp/ident-1.c b/gcc/testsuite/gcc.dg/cpp/ident-1.c
index cb6c0dcf658..da6e516d2f0 100644
--- a/gcc/testsuite/gcc.dg/cpp/ident-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/ident-1.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "" } */ /* shut off -pedantic */
+/* { dg-options "-Wno-deprecated" } */ /* shut off -pedantic */
/* Based on PR 16999 */
diff --git a/gcc/testsuite/gcc.dg/cpp/ident.c b/gcc/testsuite/gcc.dg/cpp/ident.c
index 3820f4b43ad..5477cbe1067 100644
--- a/gcc/testsuite/gcc.dg/cpp/ident.c
+++ b/gcc/testsuite/gcc.dg/cpp/ident.c
@@ -1,6 +1,6 @@
/* Test #ident. */
/* { dg-do compile } */
-/* { dg-options "" } */ /* shut off -pedantic */
+/* { dg-options "-Wno-deprecated" } */ /* shut off -pedantic */
#ident "this is an ident"
diff --git a/gcc/testsuite/gcc.dg/cpp/import1.c b/gcc/testsuite/gcc.dg/cpp/import1.c
index d118d7fb051..07130f014c1 100644
--- a/gcc/testsuite/gcc.dg/cpp/import1.c
+++ b/gcc/testsuite/gcc.dg/cpp/import1.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-deprecated" } */
/* This tests that our eagerness to apply the multiple include guard
optimization to the #import doesn't stop us marking the file
diff --git a/gcc/testsuite/gcc.dg/cpp/import2.c b/gcc/testsuite/gcc.dg/cpp/import2.c
index 5c32523880e..99b987551b3 100644
--- a/gcc/testsuite/gcc.dg/cpp/import2.c
+++ b/gcc/testsuite/gcc.dg/cpp/import2.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc. */
+/* Copyright (C) 2003, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-deprecated" } */
/* This tests that the file is only included once
Neil Booth, 2 August 2003. */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr22168-2.c b/gcc/testsuite/gcc.dg/cpp/pr22168-2.c
new file mode 100644
index 00000000000..c1e308dfcd8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr22168-2.c
@@ -0,0 +1,12 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc. */
+/* PR preprocessor/22168 */
+
+/* { dg-do preprocess }
+ { dg-options -Wdeprecated } */
+#if #foo(bar) /* { dg-warning "deprecated" } */
+int x;
+#else
+int y;
+#endif
+#assert zzz(a) /* { dg-warning "deprecated" } */
+#unassert yyy /* { dg-warning "deprecated" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr22168.c b/gcc/testsuite/gcc.dg/cpp/pr22168.c
new file mode 100644
index 00000000000..fecb972f766
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr22168.c
@@ -0,0 +1,12 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc. */
+/* PR preprocessor/22168 */
+
+/* { dg-do preprocess }
+ { dg-options -pedantic } */
+#if #foo(bar) /* { dg-warning "GCC extension" } */
+int x;
+#else
+int y;
+#endif
+#assert zzz(a) /* { dg-warning "GCC extension" } */
+#unassert yyy /* { dg-warning "GCC extension" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert1.c b/gcc/testsuite/gcc.dg/cpp/trad/assert1.c
index ff7cc620bec..d1446105c54 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert1.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/assert1.c
@@ -1,6 +1,6 @@
/* Basic tests of the #assert preprocessor extension. */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-deprecated" } */
#define def unused expansion
#define fail int fail
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert2.c b/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
index 9838e149cbf..4aa0b994479 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
@@ -1,5 +1,6 @@
/* Malformed assertion tests. */
/* { dg-do preprocess } */
+/* { dg-options "-Wno-deprecated" } */
#assert /* { dg-error "without predicate" "assert w/o predicate" } */
#assert % /* { dg-error "an identifier" "assert punctuation" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/assert3.c b/gcc/testsuite/gcc.dg/cpp/trad/assert3.c
index df9b19fdaf9..9010ecebd4e 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/assert3.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/assert3.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
+/* Copyright (C) 2000, 2008 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-A abc=def -A abc\(ghi\) \"-Aabc = jkl\" -A abc=mno -A -abc=mno" } */
+/* { dg-options "-A abc=def -A abc\(ghi\) \"-Aabc = jkl\" -A abc=mno -A -abc=mno -Wno-deprecated" } */
/* Test -A command line syntax. Source Neil Booth. 31 Oct 2000. */
diff --git a/gcc/testsuite/gcc.dg/debug/debug-3.c b/gcc/testsuite/gcc.dg/debug/debug-3.c
index bb819f4f022..e2b7a4b1803 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-3.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-3.c
@@ -1,6 +1,7 @@
/* This testcase failed, because scope containing baz was deleted
(spanned 0 basic blocks) and DWARF-2 couldn't find baz origin. */
/* { dg-do compile } */
+/* { dg-require-effective-target trampolines } */
struct A { char *a, *b, *c, *d; };
diff --git a/gcc/testsuite/gcc.dg/debug/debug-5.c b/gcc/testsuite/gcc.dg/debug/debug-5.c
index 8f26fc47b8b..f66b861c84f 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-5.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-5.c
@@ -1,6 +1,7 @@
/* This testcase failed, because scope containing baz was deleted
(spanned 0 basic blocks) and DWARF-2 couldn't find baz origin. */
/* { dg-do compile } */
+/* { dg-require-effective-target trampolines } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/pch/import-1.c b/gcc/testsuite/gcc.dg/pch/import-1.c
index 09460af057e..b036217f82b 100644
--- a/gcc/testsuite/gcc.dg/pch/import-1.c
+++ b/gcc/testsuite/gcc.dg/pch/import-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-I. -I $srcdir/gcc.dg/pch" } */
+/* { dg-options "-I. -I $srcdir/gcc.dg/pch -Wno-deprecated" } */
#include "import-1.h"
#include "import-1a.h"
#import "import-1b.h"
diff --git a/gcc/testsuite/gcc.dg/pch/import-1.hs b/gcc/testsuite/gcc.dg/pch/import-1.hs
index 87d9ed92bea..a59099d44d4 100644
--- a/gcc/testsuite/gcc.dg/pch/import-1.hs
+++ b/gcc/testsuite/gcc.dg/pch/import-1.hs
@@ -1,4 +1,4 @@
-/* { dg-options "-I. -I $srcdir/gcc.dg/pch" } */
+/* { dg-options "-I. -I $srcdir/gcc.dg/pch -Wno-deprecated" } */
#import "import-1a.h"
#include "import-1b.h"
#include "import-1c.h"
diff --git a/gcc/testsuite/gcc.dg/pch/import-2.c b/gcc/testsuite/gcc.dg/pch/import-2.c
index f9535688182..c037e3d1f6f 100644
--- a/gcc/testsuite/gcc.dg/pch/import-2.c
+++ b/gcc/testsuite/gcc.dg/pch/import-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-I. -I $srcdir/gcc.dg/pch/include" } */
+/* { dg-options "-I. -I $srcdir/gcc.dg/pch/include -Wno-deprecated" } */
#include "import-2.h"
#import "import-2b.h"
diff --git a/gcc/testsuite/gcc.dg/pch/import-2.hs b/gcc/testsuite/gcc.dg/pch/import-2.hs
index f9798c12266..8a725de14a2 100644
--- a/gcc/testsuite/gcc.dg/pch/import-2.hs
+++ b/gcc/testsuite/gcc.dg/pch/import-2.hs
@@ -1,4 +1,4 @@
-/* { dg-options "-I $srcdir/gcc.dg/pch/include" } */
+/* { dg-options "-I $srcdir/gcc.dg/pch/include -Wno-deprecated" } */
#import "import-2b.h"
#import "import-2a.h"
diff --git a/gcc/testsuite/gcc.dg/pr34457-1.c b/gcc/testsuite/gcc.dg/pr34457-1.c
index 7a1efed54d9..ccd937c6b52 100644
--- a/gcc/testsuite/gcc.dg/pr34457-1.c
+++ b/gcc/testsuite/gcc.dg/pr34457-1.c
@@ -1,5 +1,6 @@
/* PR c/34457 */
/* { dg-do compile } */
+/* { dg-require-effective-target trampolines } */
/* { dg-options "--combine -O2" } */
/* { dg-additional-sources "pr34457-2.c" } */
diff --git a/gcc/testsuite/gcc.dg/pr36111.c b/gcc/testsuite/gcc.dg/pr36111.c
new file mode 100644
index 00000000000..498c39e1be4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr36111.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-O2 -fpic" } */
+
+typedef struct {
+ int lock;
+ int pad0_;
+} mutex_t;
+
+static mutex_t main_arena;
+
+void __malloc_check_init()
+{
+ for(;;)
+ __asm__ __volatile__ ("": "+m"(main_arena.lock) );
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr36227.c b/gcc/testsuite/gcc.dg/pr36227.c
new file mode 100644
index 00000000000..d6657632b91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr36227.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wstrict-overflow=3" } */
+
+volatile unsigned long *
+sat_add(volatile unsigned long *ptr, unsigned long i, volatile unsigned long *end)
+{
+ if ((unsigned long)ptr + i * sizeof(*ptr) > (unsigned long)ptr) /* { dg-bogus "pointer wraparound" } */
+ return ptr + i;
+ else
+ return end;
+}
+
diff --git a/gcc/testsuite/gcc.dg/trampoline-1.c b/gcc/testsuite/gcc.dg/trampoline-1.c
index 88078621066..e3dcf573a94 100644
--- a/gcc/testsuite/gcc.dg/trampoline-1.c
+++ b/gcc/testsuite/gcc.dg/trampoline-1.c
@@ -2,6 +2,7 @@
/* Origin: Waldek Hebisch <hebisch@math.uni.wroc.pl> */
/* { dg-do run } */
+/* { dg-require-effective-target trampolines } */
/* { dg-options "-O2" } */
/* This used to fail on various versions of Solaris 2 because the
diff --git a/gcc/testsuite/gcc.target/i386/sse2-set-epi32-1.c b/gcc/testsuite/gcc.target/i386/sse2-set-epi32-1.c
new file mode 100644
index 00000000000..f4dac40fc99
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-set-epi32-1.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msse2" } */
+
+#include "sse2-check.h"
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <emmintrin.h>
+
+static void
+__attribute__((noinline))
+test (unsigned int *v)
+{
+ union
+ {
+ __m128i x;
+ unsigned int i[4];
+ } u;
+ unsigned int i;
+
+ u.x = _mm_set_epi32 (v[3], v[2], v[1], v[0]);
+
+ for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
+ if (v[i] != u.i[i])
+ {
+#ifdef DEBUG
+ printf ("%i: 0x%x != 0x%x\n", i, v[i], u.i[i]);
+#endif
+ abort ();
+ }
+}
+
+static void
+sse2_test (void)
+{
+ unsigned int v[4]
+ = { 0x7B5B5465, 0x73745665, 0x63746F72, 0x5D53475D };
+ test (v);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse2-set-epi64x-1.c b/gcc/testsuite/gcc.target/i386/sse2-set-epi64x-1.c
new file mode 100644
index 00000000000..67510b59c7e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-set-epi64x-1.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msse2" } */
+
+#include "sse2-check.h"
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <emmintrin.h>
+
+static void
+__attribute__((noinline))
+test (unsigned long long *v)
+{
+ union
+ {
+ __m128i x;
+ unsigned long long i[2];
+ } u;
+ unsigned int i;
+
+ u.x = _mm_set_epi64x (v[1], v[0]);
+
+ for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
+ if (v[i] != u.i[i])
+ {
+#ifdef DEBUG
+ printf ("%i: 0x%llx != 0x%llx\n", i, v[i], u.i[i]);
+#endif
+ abort ();
+ }
+}
+
+static void
+sse2_test (void)
+{
+ unsigned long long v[2]
+ = { 0x7B5B546573745665LL, 0x63746F725D53475DLL };
+ test (v);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-set-epi32-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-set-epi32-1.c
new file mode 100644
index 00000000000..989e4f7086f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-set-epi32-1.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sse4 } */
+/* { dg-options "-O2 -msse4.1" } */
+
+#include "sse4_1-check.h"
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <emmintrin.h>
+
+static void
+__attribute__((noinline))
+test (unsigned int *v)
+{
+ union
+ {
+ __m128i x;
+ unsigned int i[4];
+ } u;
+ unsigned int i;
+
+ u.x = _mm_set_epi32 (v[3], v[2], v[1], v[0]);
+
+ for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
+ if (v[i] != u.i[i])
+ {
+#ifdef DEBUG
+ printf ("%i: 0x%x != 0x%x\n", i, v[i], u.i[i]);
+#endif
+ abort ();
+ }
+}
+
+static void
+sse4_1_test (void)
+{
+ unsigned int v[4]
+ = { 0x7B5B5465, 0x73745665, 0x63746F72, 0x5D53475D };
+ test (v);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-set-epi64x-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-set-epi64x-1.c
new file mode 100644
index 00000000000..8679f52860f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-set-epi64x-1.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sse4 } */
+/* { dg-options "-O2 -msse4.1" } */
+
+#include "sse4_1-check.h"
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <emmintrin.h>
+
+static void
+__attribute__((noinline))
+test (unsigned long long *v)
+{
+ union
+ {
+ __m128i x;
+ unsigned long long i[2];
+ } u;
+ unsigned int i;
+
+ u.x = _mm_set_epi64x (v[1], v[0]);
+
+ for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
+ if (v[i] != u.i[i])
+ {
+#ifdef DEBUG
+ printf ("%i: 0x%llx != 0x%llx\n", i, v[i], u.i[i]);
+#endif
+ abort ();
+ }
+}
+
+static void
+sse4_1_test (void)
+{
+ unsigned long long v[2]
+ = { 0x7B5B546573745665LL, 0x63746F725D53475DLL };
+ test (v);
+}
diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index bd8b5fa78d6..526bbdb14f2 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -373,6 +373,7 @@ proc dg-mips-options {args} {
setup_mips_tests
dg-init
+# MIPS16 is defined in add_options_for_mips16_attribute.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" \
- "-DMIPS16=__attribute__((mips16)) -DNOMIPS16=__attribute__((nomips16))"
+ "-DNOMIPS16=__attribute__((nomips16))"
dg-finish
diff --git a/gcc/testsuite/gcc.target/mips/scc-1.c b/gcc/testsuite/gcc.target/mips/scc-1.c
index 443b0bf7d17..4bd4a4c2fb2 100644
--- a/gcc/testsuite/gcc.target/mips/scc-1.c
+++ b/gcc/testsuite/gcc.target/mips/scc-1.c
@@ -1,5 +1,6 @@
-/* { dg-do compile } */
+/* { dg-do compile { target mips16_attribute } } */
/* { dg-mips-options "-O -mips32" } */
+/* { dg-add-options mips16_attribute } */
/* { dg-final { scan-assembler-times {slt \$2,\$5,\$4} 1 } } */
/* { dg-final { scan-assembler-times {sltu \$2,\$5,\$4} 1 } } */
diff --git a/gcc/testsuite/gcc.target/mips/scc-3.c b/gcc/testsuite/gcc.target/mips/scc-3.c
index e496d401dd4..eb9d575f061 100644
--- a/gcc/testsuite/gcc.target/mips/scc-3.c
+++ b/gcc/testsuite/gcc.target/mips/scc-3.c
@@ -1,5 +1,6 @@
-/* { dg-do compile } */
+/* { dg-do compile { target mips16_attribute } } */
/* { dg-mips-options "-O -mabi=o64" } */
+/* { dg-add-options mips16_attribute } */
/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
/* { dg-final { scan-assembler-times "slt\t\|sltu\t" 8 } } */
diff --git a/gcc/testsuite/gfortran.dg/associated_5.f90 b/gcc/testsuite/gfortran.dg/associated_5.f90
new file mode 100644
index 00000000000..a2007752f3c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associated_5.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! PR 35719 - associated used to fail with zero-sized automatic arrays
+! Test case contributed by Dick Hendrickson
+
+ program try_mf1053
+
+ call mf1053 ( 1, 2, 3, 4)
+ end
+
+ SUBROUTINE MF1053 (nf1, nf2, nf3, nf4)
+ INTEGER, pointer :: ptr(:,:)
+ INTEGER, target :: ILA1(NF2,NF4:NF3)
+
+ ptr => ILA1
+
+ if (ASSOCIATED (ptr, ILA1(NF1:NF2,NF4:NF3) ) ) call abort
+ if ( .not. ASSOCIATED(ptr) ) call abort
+
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/default_format_1.f90 b/gcc/testsuite/gfortran.dg/default_format_1.f90
index b8dd0726d9e..9d3e3ad7635 100644
--- a/gcc/testsuite/gfortran.dg/default_format_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_1.f90
@@ -12,14 +12,12 @@ program main
use test_default_format
if (test (1.0_4, 0) /= 0) call abort
- if (test (0.0_4, 0) /= 0) call abort
if (test (tiny(0.0_4), 1) /= 0) call abort
if (test (-tiny(0.0_4), -1) /= 0) call abort
if (test (huge(0.0_4), -1) /= 0) call abort
if (test (-huge(0.0_4), 1) /= 0) call abort
if (test (1.0_8, 0) /= 0) call abort
- if (test (0.0_8, 0) /= 0) call abort
if (test (tiny(0.0_8), 1) /= 0) call abort
if (test (-tiny(0.0_8), -1) /= 0) call abort
if (test (huge(0.0_8), -1) /= 0) call abort
diff --git a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
index 99cf187861a..46cd175e5fa 100644
--- a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-apple-darwin* *-*-freebsd* } }
+! { dg-do run { xfail *-apple-darwin* *-*-freebsd* *-*-mingw* } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormals.
!
@@ -13,9 +13,12 @@ program main
if (test (tiny(0.0_4), -1) /= 0) call abort
if (test (-tiny(0.0_4), 1) /= 0) call abort
+ if (test (0.0_4, 0) /= 0) call abort
if (test (tiny(0.0_8), -1) /= 0) call abort
if (test (-tiny(0.0_8), 1) /= 0) call abort
+ if (test (0.0_8, 0) /= 0) call abort
+
end program main
!
! { dg-final { cleanup-modules "test_default_format" } }
diff --git a/gcc/testsuite/gfortran.dg/fmt_t_5.f90 b/gcc/testsuite/gfortran.dg/fmt_t_5.f90
index c472e89b19c..0c27b6aa3eb 100644
--- a/gcc/testsuite/gfortran.dg/fmt_t_5.f90
+++ b/gcc/testsuite/gfortran.dg/fmt_t_5.f90
@@ -12,7 +12,7 @@
read(10, pos=1) output(1:21)
if (output(1:21).ne."ab x") call abort
read(10) c
- if (c.ne.achar(10)) call abort
+ if ((c.ne.achar(10)) .and. (c.ne.achar(13))) call abort
close (10, status="delete")
10 format (a2,t1,a1,t2,a1,t20,' x')
end
diff --git a/gcc/testsuite/gfortran.dg/fseek.f90 b/gcc/testsuite/gfortran.dg/fseek.f90
index acc8211a414..2bf2e0dc8dd 100644
--- a/gcc/testsuite/gfortran.dg/fseek.f90
+++ b/gcc/testsuite/gfortran.dg/fseek.f90
@@ -3,10 +3,18 @@
PROGRAM test_fseek
INTEGER, PARAMETER :: SEEK_SET = 0, SEEK_CUR = 1, SEEK_END = 2, fd=10
INTEGER :: ierr = 0
+ INTEGER :: newline_length
- ! expected position: 12, one leading blank + 10 + newline
+ ! We first need to determine if a newline is one or two characters
+ open (911,status="scratch")
+ write(911,"()")
+ newline_length = ftell(911)
+ close (911)
+ if (newline_length < 1 .or. newline_length > 2) call abort()
+
+ ! expected position: one leading blank + 10 + newline
WRITE(fd, *) "1234567890"
- IF (FTELL(fd) /= 12) CALL abort()
+ IF (FTELL(fd) /= 11 + newline_length) CALL abort()
! move backward from current position
CALL FSEEK(fd, -12, SEEK_CUR, ierr)
diff --git a/gcc/testsuite/gfortran.dg/nint_2.f90 b/gcc/testsuite/gfortran.dg/nint_2.f90
index e51f4d9ff1d..6584f50fcf6 100644
--- a/gcc/testsuite/gfortran.dg/nint_2.f90
+++ b/gcc/testsuite/gfortran.dg/nint_2.f90
@@ -3,7 +3,7 @@
! PR 31202
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
!
-! { dg-do run { xfail powerpc-ibm-aix* powerpc*-*-linux* } }
+! { dg-do run { xfail powerpc-ibm-aix* powerpc*-*-linux* *-*-mingw* } }
real(kind=8) :: a
integer(kind=8) :: i1, i2
real :: b
diff --git a/gcc/testsuite/gfortran.dg/streamio_15.f90 b/gcc/testsuite/gfortran.dg/streamio_15.f90
index 09d9a2af1d3..bbe91f1106d 100644
--- a/gcc/testsuite/gfortran.dg/streamio_15.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_15.f90
@@ -4,7 +4,15 @@
program main
implicit none
character(len=6) :: c
- integer :: i
+ integer :: i, newline_length
+
+ open(20,status="scratch",access="stream",form="formatted")
+ write(20,"()")
+ inquire(20,pos=newline_length)
+ newline_length = newline_length - 1
+ if (newline_length < 1 .or. newline_length > 2) call abort
+ close(20)
+
open(20,file="foo.txt",form="formatted",access="stream")
write(20,'(A)') '123456'
write(20,'(A)') 'abcdef'
@@ -15,7 +23,7 @@ program main
if (c.ne.'123456') call abort
! Save the position
inquire(20,pos=i)
- if (i.ne.8) call abort
+ if (i.ne.7+newline_length) call abort
! Read in the complete line...
read(20,'(A)') c
if (c.ne.'abcdef') call abort
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_9.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_9.f90
new file mode 100644
index 00000000000..02b86111b2b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_9.f90
@@ -0,0 +1,23 @@
+! { dg-do run }
+!
+! Various checks on simplification of TRANSFER of substrings
+ character(len=4), parameter :: t = "xyzt"
+ integer, parameter :: w = transfer(t,0)
+ integer :: i = 1
+ if (transfer(t,0) /= w) call abort
+ if (transfer(t(:),0) /= w) call abort
+ if (transfer(t(1:4),0) /= w) call abort
+ if (transfer(t(i:i+3),0) /= w) call abort
+
+ if (transfer(t(1:1), 0_1) /= transfer("x", 0_1)) call abort
+ if (transfer(t(2:2), 0_1) /= transfer("y", 0_1)) call abort
+ if (transfer(t(i:i), 0_1) /= transfer("x", 0_1)) call abort
+ if (transfer(t(i+1:i+1), 0_1) /= transfer("y", 0_1)) call abort
+ if (transfer(t(1:2), 0_2) /= transfer("xy", 0_2)) call abort
+ if (transfer(t(3:4), 0_2) /= transfer("zt", 0_2)) call abort
+
+ if (transfer(transfer(-1, t), 0) /= -1) call abort
+ if (transfer(transfer(-1, t(:)), 0) /= -1) call abort
+ if (any (transfer(transfer(-1, (/t(1:1)/)), (/0_1/)) /= -1)) call abort
+ if (transfer(transfer(-1, t(1:1)), 0_1) /= -1) call abort
+ end
diff --git a/gcc/testsuite/gfortran.dg/vect/pr36119.f b/gcc/testsuite/gfortran.dg/vect/O3-pr36119.f90
index d4b11cb3679..432e8485a5a 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr36119.f
+++ b/gcc/testsuite/gfortran.dg/vect/O3-pr36119.f90
@@ -1,5 +1,4 @@
-! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
-! { dg-options "-O3 -mfpmath=sse -msse2 -ffree-form" }
+! { dg-do compile }
SUBROUTINE check_dnucint_ana (dcore)
IMPLICIT NONE
diff --git a/gcc/testsuite/gfortran.dg/vect/vect.exp b/gcc/testsuite/gfortran.dg/vect/vect.exp
index 518b6850b6a..c532967ae36 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect.exp
+++ b/gcc/testsuite/gfortran.dg/vect/vect.exp
@@ -137,6 +137,12 @@ lappend DEFAULT_VECTCFLAGS "--param" "vect-max-version-for-alias-checks=0"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-vfa-*.\[fF\]{,90,95,03,08} ]] \
"" $DEFAULT_VECTCFLAGS
+# With -O3
+set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
+lappend DEFAULT_VECTCFLAGS "-O3"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[fF\]{,90,95,03,08} ]] \
+ "" $DEFAULT_VECTCFLAGS
+
# Clean up.
set dg-do-what-default ${save-dg-do-what-default}
diff --git a/gcc/testsuite/gfortran.dg/write_to_null.f90 b/gcc/testsuite/gfortran.dg/write_to_null.F90
index c6f12cb2ec5..bce1db03a7f 100644
--- a/gcc/testsuite/gfortran.dg/write_to_null.f90
+++ b/gcc/testsuite/gfortran.dg/write_to_null.F90
@@ -1,8 +1,15 @@
! { dg-do run }
! pr18983
! could not write to /dev/null
+
+#if defined _WIN32
+#define DEV_NULL "nul"
+#else
+#define DEV_NULL "/dev/null"
+#endif
+
integer i
- open(10,file="/dev/null")
+ open(10,file=DEV_NULL)
do i = 1,100
write(10,*) "Hello, world"
end do
diff --git a/gcc/testsuite/gnat.dg/conv_integer.adb b/gcc/testsuite/gnat.dg/conv_integer.adb
new file mode 100644
index 00000000000..7693da0775a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/conv_integer.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Conv_Integer is
+ S : constant := Integer'Size;
+ type Regoff_T is range -1 .. 2 ** (S-1);
+ for Regoff_T'Size use S;
+ B : Integer;
+ C : Regoff_T;
+begin
+ B := Integer (C);
+end;
diff --git a/gcc/testsuite/gnat.dg/discr7.adb b/gcc/testsuite/gnat.dg/discr7.adb
new file mode 100644
index 00000000000..3bb61cb12b6
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr7.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile }
+
+procedure Discr7 is
+
+ subtype Index is Natural range 0..5;
+ type BitString is array(Index range <>) of Boolean;
+ pragma Pack(BitString);
+
+ function Id (I : Integer) return Integer is
+ begin
+ return I;
+ end;
+
+ type E(D : Index) is record
+ C : BitString(1..D);
+ end record;
+
+ subtype E0 is E(Id(0));
+
+ function F return E0 is
+ begin
+ return E'(D=>0, C=>(1..0=>FALSE));
+ end;
+
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/statically_matching.ads b/gcc/testsuite/gnat.dg/statically_matching.ads
new file mode 100644
index 00000000000..de2ba1b0bea
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/statically_matching.ads
@@ -0,0 +1,7 @@
+package Statically_Matching is
+ type T1(b: boolean) is tagged null record;
+ type T2 is new T1(b => false) with private;
+private
+ F: constant boolean := false;
+ type T2 is new T1(b => F) with null record; -- OK
+end Statically_Matching;
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index dcc366014b7..48fe4cc6fe2 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -140,8 +140,9 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
# Look for an internal compiler error, which sometimes masks the fact
- # that we didn't get an expected error message. An ICE always fails,
- # there's no way to XFAIL it.
+ # that we didn't get an expected error message. XFAIL an ICE via
+ # dg-xfail-if and use { dg-prune-output ".*internal compiler error.*" }
+ # to avoid a second failure for excess errors.
if [string match "*internal compiler error*" $comp_output] {
upvar 2 name name
fail "$name (internal compiler error)"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 150a217ea6c..2d14dde2ad5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -650,7 +650,7 @@ proc check_effective_target_nomips16 { } {
# we don't support MIPS16 PIC.
proc add_options_for_mips16_attribute { flags } {
- return "$flags -mno-abicalls -fno-pic"
+ return "$flags -mno-abicalls -fno-pic -DMIPS16=__attribute__((mips16))"
}
# Return true if we can force a mode that allows MIPS16 code generation.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 973b2844063..4eab1fd449e 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3613,6 +3613,18 @@ one_pointer_to_useless_type_conversion_p (tree dest, tree src_obj)
return false;
}
+/* Return true if TYPE1 is a fixed-point type and if conversions to and
+ from TYPE2 can be handled by FIXED_CONVERT_EXPR. */
+
+static bool
+valid_fixed_convert_types_p (tree type1, tree type2)
+{
+ return (FIXED_POINT_TYPE_P (type1)
+ && (INTEGRAL_TYPE_P (type2)
+ || SCALAR_FLOAT_TYPE_P (type2)
+ || FIXED_POINT_TYPE_P (type2)));
+}
+
/* Verify the GIMPLE expression EXPR. Returns true if there is an
error, otherwise false. */
@@ -3669,6 +3681,27 @@ verify_gimple_expr (tree expr)
return false;
}
+ case FIXED_CONVERT_EXPR:
+ {
+ tree op = TREE_OPERAND (expr, 0);
+ if (!is_gimple_val (op))
+ {
+ error ("invalid operand in conversion");
+ return true;
+ }
+
+ if (!valid_fixed_convert_types_p (type, TREE_TYPE (op))
+ && !valid_fixed_convert_types_p (TREE_TYPE (op), type))
+ {
+ error ("invalid types in fixed-point conversion");
+ debug_generic_expr (type);
+ debug_generic_expr (TREE_TYPE (op));
+ return true;
+ }
+
+ return false;
+ }
+
case FLOAT_EXPR:
{
tree op = TREE_OPERAND (expr, 0);
@@ -4763,7 +4796,7 @@ tree_make_forwarder_block (edge fallthru)
var = PHI_RESULT (phi);
new_phi = create_phi_node (var, bb);
SSA_NAME_DEF_STMT (var) = new_phi;
- SET_PHI_RESULT (phi, make_ssa_name (cfun, SSA_NAME_VAR (var), phi));
+ SET_PHI_RESULT (phi, make_ssa_name (SSA_NAME_VAR (var), phi));
add_phi_arg (new_phi, PHI_RESULT (phi), fallthru);
}
@@ -5611,7 +5644,7 @@ replace_ssa_name (tree name, struct pointer_map_t *vars_map,
if (gimple_in_ssa_p (cfun))
add_referenced_var (decl);
- new_name = make_ssa_name (cfun, decl, SSA_NAME_DEF_STMT (name));
+ new_name = make_ssa_name (decl, SSA_NAME_DEF_STMT (name));
if (SSA_NAME_IS_DEFAULT_DEF (name))
set_default_def (decl, new_name);
pop_cfun ();
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index a029ae3397f..8d680dfa6bf 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -468,7 +468,7 @@ get_component_ssa_name (tree ssa_name, bool imag_p)
if (ret == NULL)
{
ret = get_component_var (SSA_NAME_VAR (ssa_name), imag_p);
- ret = make_ssa_name (cfun, ret, NULL);
+ ret = make_ssa_name (ret, NULL);
/* Copy some properties from the original. In particular, whether it
is used in an abnormal phi, and whether it's uninitialized. */
@@ -1066,7 +1066,7 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
tmp = create_tmp_var (boolean_type_node, NULL);
cond = build_gimple_modify_stmt (tmp, compare);
if (gimple_in_ssa_p (cfun))
- tmp = make_ssa_name (cfun, tmp, cond);
+ tmp = make_ssa_name (tmp, cond);
GIMPLE_STMT_OPERAND (cond, 0) = tmp;
bsi_insert_before (bsi, cond, BSI_SAME_STMT);
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 1225cbcd456..57410f59171 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -1724,4 +1724,15 @@ redirect_edge_var_map_result (edge_var_map *v)
{
return v->result;
}
+
+
+/* Return an SSA_NAME node for variable VAR defined in statement STMT
+ in function cfun. */
+
+static inline tree
+make_ssa_name (tree var, tree stmt)
+{
+ return make_ssa_name_fn (cfun, var, stmt);
+}
+
#endif /* _TREE_FLOW_INLINE_H */
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 71246fd2744..bd1f87ab396 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -833,6 +833,12 @@ extern void add_phi_arg (tree, tree, edge);
extern void remove_phi_args (edge);
extern void remove_phi_node (tree, tree, bool);
extern tree phi_reverse (tree);
+extern void init_phinodes (void);
+extern void fini_phinodes (void);
+extern void release_phi_node (tree);
+#ifdef GATHER_STATISTICS
+extern void phinodes_print_statistics (void);
+#endif
/* In gimple-low.c */
extern void record_vars_into (tree, tree);
@@ -898,7 +904,6 @@ extern void redirect_edge_var_map_dup (edge, edge);
extern edge_var_map_vector redirect_edge_var_map_vector (edge);
extern void redirect_edge_var_map_destroy (void);
-
extern edge ssa_redirect_edge (edge, basic_block);
extern void flush_pending_stmts (edge);
extern bool tree_ssa_useless_type_conversion (tree);
@@ -928,6 +933,20 @@ void mark_set_for_renaming (bitmap);
tree get_current_def (tree);
void set_current_def (tree, tree);
+/* In tree-ssanames.c */
+extern void init_ssanames (struct function *, int);
+extern void fini_ssanames (void);
+extern tree make_ssa_name_fn (struct function *, tree, tree);
+extern tree duplicate_ssa_name (tree, tree);
+extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *);
+extern void release_ssa_name (tree);
+extern void release_defs (tree);
+extern void replace_ssa_name_symbol (tree, tree);
+
+#ifdef GATHER_STATISTICS
+extern void ssanames_print_statistics (void);
+#endif
+
/* In tree-ssa-ccp.c */
bool fold_stmt (tree *);
bool fold_stmt_inplace (tree);
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index e56cbdcb2f6..5c285efba55 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1036,7 +1036,7 @@ ifc_temp_var (tree type, tree exp)
/* Get SSA name for the new variable and set make new statement
its definition statement. */
- new_name = make_ssa_name (cfun, var, stmt);
+ new_name = make_ssa_name (var, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = new_name;
SSA_NAME_DEF_STMT (new_name) = stmt;
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 3107f933658..1ba7b60f6f1 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -182,7 +182,7 @@ remap_ssa_name (tree name, copy_body_data *id)
&& (TREE_CODE (SSA_NAME_VAR (name)) != RESULT_DECL
|| !id->transform_return_to_modify))
{
- new = make_ssa_name (cfun, new, NULL);
+ new = make_ssa_name (new, NULL);
insert_decl_map (id, name, new);
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new)
= SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name);
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 58a67b11620..5542ede5503 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1067,7 +1067,7 @@ get_default_def_for (tree sym)
if (ddef == NULL_TREE)
{
- ddef = make_ssa_name (cfun, sym, build_empty_stmt ());
+ ddef = make_ssa_name (sym, build_empty_stmt ());
set_default_def (sym, ddef);
}
@@ -1380,7 +1380,7 @@ rewrite_stmt (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
{
tree var = DEF_FROM_PTR (def_p);
gcc_assert (DECL_P (var));
- SET_DEF (def_p, make_ssa_name (cfun, var, stmt));
+ SET_DEF (def_p, make_ssa_name (var, stmt));
register_new_def (DEF_FROM_PTR (def_p), var);
}
}
@@ -1905,7 +1905,7 @@ maybe_register_def (def_operand_p def_p, tree stmt)
{
if (DECL_P (def))
{
- def = make_ssa_name (cfun, def, stmt);
+ def = make_ssa_name (def, stmt);
SET_DEF (def_p, def);
}
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 42a8b8e7bbf..12ce1b9c692 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -1418,7 +1418,7 @@ insert_backedge_copies (void)
PHI result. */
stmt = build_gimple_modify_stmt (NULL_TREE,
PHI_ARG_DEF (phi, i));
- name = make_ssa_name (cfun, result_var, stmt);
+ name = make_ssa_name (result_var, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name;
/* Insert the new statement into the block and update
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 3ba8d8b5673..992437d3be4 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -484,7 +484,7 @@ take_address_of (tree obj, tree type, edge entry, htab_t decl_address)
bvar = create_tmp_var (TREE_TYPE (addr), get_name (*var_p));
add_referenced_var (bvar);
stmt = build_gimple_modify_stmt (bvar, addr);
- name = make_ssa_name (cfun, bvar, stmt);
+ name = make_ssa_name (bvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name;
bsi_insert_on_edge_immediate (entry, stmt);
@@ -914,7 +914,7 @@ create_phi_for_local_result (void **slot, void *data)
e = EDGE_PRED (store_bb, 1);
else
e = EDGE_PRED (store_bb, 0);
- local_res = make_ssa_name (cfun,
+ local_res = make_ssa_name (
SSA_NAME_VAR (GIMPLE_STMT_OPERAND (reduc->reduc_stmt, 0)),
NULL_TREE);
new_phi = create_phi_node (local_res, store_bb);
@@ -970,7 +970,7 @@ create_call_for_reduction_1 (void **slot, void *data)
tmp_load = create_tmp_var (TREE_TYPE (TREE_TYPE (addr)), NULL);
add_referenced_var (tmp_load);
- tmp_load = make_ssa_name (cfun, tmp_load, NULL);
+ tmp_load = make_ssa_name (tmp_load, NULL);
load = build2 (OMP_ATOMIC_LOAD, void_type_node, tmp_load, addr);
SSA_NAME_DEF_STMT (tmp_load) = load;
bsi = bsi_start (new_bb);
@@ -1232,7 +1232,7 @@ separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
add_referenced_var (*arg_struct);
nvar = create_tmp_var (build_pointer_type (type), ".paral_data_load");
add_referenced_var (nvar);
- *new_arg_struct = make_ssa_name (cfun, nvar, NULL_TREE);
+ *new_arg_struct = make_ssa_name (nvar, NULL_TREE);
ld_st_data->store = *arg_struct;
ld_st_data->load = *new_arg_struct;
@@ -1248,7 +1248,7 @@ separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
{
htab_traverse (reduction_list, create_stores_for_reduction,
ld_st_data);
- clsn_data.load = make_ssa_name (cfun, nvar, NULL_TREE);
+ clsn_data.load = make_ssa_name (nvar, NULL_TREE);
clsn_data.load_bb = exit->dest;
clsn_data.store = ld_st_data->store;
create_final_loads_for_reduction (reduction_list, &clsn_data);
@@ -1449,7 +1449,7 @@ transform_to_exit_first_loop (struct loop *loop, htab_t reduction_list, tree nit
for (phi = phi_nodes (loop->header); phi; phi = PHI_CHAIN (phi))
{
res = PHI_RESULT (phi);
- t = make_ssa_name (cfun, SSA_NAME_VAR (res), phi);
+ t = make_ssa_name (SSA_NAME_VAR (res), phi);
SET_PHI_RESULT (phi, t);
nphi = create_phi_node (res, orig_header);
@@ -1554,7 +1554,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
{
bsi = bsi_after_labels (bb);
- param = make_ssa_name (cfun, DECL_ARGUMENTS (loop_fn), NULL_TREE);
+ param = make_ssa_name (DECL_ARGUMENTS (loop_fn), NULL_TREE);
t = build_gimple_modify_stmt (param, build_fold_addr_expr (data));
bsi_insert_before (&bsi, t, BSI_SAME_STMT);
SSA_NAME_DEF_STMT (param) = t;
@@ -1579,7 +1579,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
cvar_base = SSA_NAME_VAR (cvar);
phi = SSA_NAME_DEF_STMT (cvar);
cvar_init = PHI_ARG_DEF_FROM_EDGE (phi, loop_preheader_edge (loop));
- initvar = make_ssa_name (cfun, cvar_base, NULL_TREE);
+ initvar = make_ssa_name (cvar_base, NULL_TREE);
SET_USE (PHI_ARG_DEF_PTR_FROM_EDGE (phi, loop_preheader_edge (loop)),
initvar);
cvar_next = PHI_ARG_DEF_FROM_EDGE (phi, loop_latch_edge (loop));
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index b45d817db80..5d74765e090 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -220,7 +220,7 @@ make_phi_node (tree var, int len)
if (TREE_CODE (var) == SSA_NAME)
SET_PHI_RESULT (phi, var);
else
- SET_PHI_RESULT (phi, make_ssa_name (cfun, var, phi));
+ SET_PHI_RESULT (phi, make_ssa_name (var, phi));
for (i = 0; i < capacity; i++)
{
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index cb9ba649fbe..a9b048e5662 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1481,7 +1481,7 @@ initialize_root_vars (struct loop *loop, chain_p chain, bitmap tmp_vars)
VEC_quick_push (tree, chain->vars, VEC_index (tree, chain->vars, 0));
for (i = 0; VEC_iterate (tree, chain->vars, i, var); i++)
- VEC_replace (tree, chain->vars, i, make_ssa_name (cfun, var, NULL_TREE));
+ VEC_replace (tree, chain->vars, i, make_ssa_name (var, NULL_TREE));
for (i = 0; i < n; i++)
{
@@ -1548,7 +1548,7 @@ initialize_root_vars_lm (struct loop *loop, dref root, bool written,
VEC_quick_push (tree, *vars, VEC_index (tree, *vars, 0));
for (i = 0; VEC_iterate (tree, *vars, i, var); i++)
- VEC_replace (tree, *vars, i, make_ssa_name (cfun, var, NULL_TREE));
+ VEC_replace (tree, *vars, i, make_ssa_name (var, NULL_TREE));
var = VEC_index (tree, *vars, 0);
@@ -1613,7 +1613,7 @@ execute_load_motion (struct loop *loop, chain_p chain, bitmap tmp_vars)
if (n_writes)
{
var = VEC_index (tree, vars, 0);
- var = make_ssa_name (cfun, SSA_NAME_VAR (var), NULL_TREE);
+ var = make_ssa_name (SSA_NAME_VAR (var), NULL_TREE);
VEC_replace (tree, vars, 0, var);
}
else
@@ -2215,14 +2215,14 @@ reassociate_to_the_same_stmt (tree name1, tree name2)
combine it with the rhs of S1. */
var = create_tmp_var (type, "predreastmp");
add_referenced_var (var);
- new_name = make_ssa_name (cfun, var, NULL_TREE);
+ new_name = make_ssa_name (var, NULL_TREE);
new_stmt = build_gimple_modify_stmt (new_name,
fold_build2 (code, type, name1, name2));
SSA_NAME_DEF_STMT (new_name) = new_stmt;
var = create_tmp_var (type, "predreastmp");
add_referenced_var (var);
- tmp_name = make_ssa_name (cfun, var, NULL_TREE);
+ tmp_name = make_ssa_name (var, NULL_TREE);
tmp_stmt = build_gimple_modify_stmt (tmp_name,
GIMPLE_STMT_OPERAND (s1, 1));
SSA_NAME_DEF_STMT (tmp_name) = tmp_stmt;
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 9bf492924d5..ba36343f548 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -763,7 +763,7 @@ rewrite_reciprocal (block_stmt_iterator *bsi)
build_real (TREE_TYPE (rhs), dconst1),
TREE_OPERAND (rhs, 1));
stmt1 = build_gimple_modify_stmt (var, tmp);
- name = make_ssa_name (cfun, var, stmt1);
+ name = make_ssa_name (var, stmt1);
GIMPLE_STMT_OPERAND (stmt1, 0) = name;
tmp = build2 (MULT_EXPR, TREE_TYPE (rhs),
name, TREE_OPERAND (rhs, 0));
@@ -842,13 +842,13 @@ rewrite_bittest (block_stmt_iterator *bsi)
t = fold_build2 (LSHIFT_EXPR, TREE_TYPE (a),
build_int_cst (TREE_TYPE (a), 1), b);
stmt1 = build_gimple_modify_stmt (var, t);
- name = make_ssa_name (cfun, var, stmt1);
+ name = make_ssa_name (var, stmt1);
GIMPLE_STMT_OPERAND (stmt1, 0) = name;
/* A & (1 << B) */
t = fold_build2 (BIT_AND_EXPR, TREE_TYPE (a), a, name);
stmt2 = build_gimple_modify_stmt (var, t);
- name = make_ssa_name (cfun, var, stmt2);
+ name = make_ssa_name (var, stmt2);
GIMPLE_STMT_OPERAND (stmt2, 0) = name;
/* Replace the SSA_NAME we compare against zero. Adjust
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 64f51420c4b..1ff6254c0b1 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -63,10 +63,10 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
add_referenced_var (var);
}
- vb = make_ssa_name (cfun, var, NULL_TREE);
+ vb = make_ssa_name (var, NULL_TREE);
if (var_before)
*var_before = vb;
- va = make_ssa_name (cfun, var, NULL_TREE);
+ va = make_ssa_name (var, NULL_TREE);
if (var_after)
*var_after = va;
@@ -986,7 +986,7 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
add_referenced_var (var);
}
- new_init = make_ssa_name (cfun, var, NULL_TREE);
+ new_init = make_ssa_name (var, NULL_TREE);
phi_rest = create_phi_node (new_init, rest);
SSA_NAME_DEF_STMT (new_init) = phi_rest;
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 64608a5bd7f..fbc7a683ec8 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -496,7 +496,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
tmp = create_tmp_var (TREE_TYPE (cond), NULL);
add_referenced_var (tmp);
- new_var = make_ssa_name (cfun, tmp, NULL);
+ new_var = make_ssa_name (tmp, NULL);
old_result = cond;
cond = new_var;
}
@@ -597,7 +597,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
op0 = TREE_OPERAND (cond, 0);
tmp = create_tmp_var (TREE_TYPE (op0), NULL);
add_referenced_var (tmp);
- cond_tmp = make_ssa_name (cfun, tmp, NULL);
+ cond_tmp = make_ssa_name (tmp, NULL);
new_stmt = build_gimple_modify_stmt (cond_tmp, op0);
SSA_NAME_DEF_STMT (cond_tmp) = new_stmt;
@@ -1043,7 +1043,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
{
tree tmp = create_tmp_var (TREE_TYPE (result), NULL);
add_referenced_var (tmp);
- lhs = make_ssa_name (cfun, tmp, NULL);
+ lhs = make_ssa_name (tmp, NULL);
}
else
lhs = result;
@@ -1317,7 +1317,7 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
on the edge which did not contain the store. */
lhs = unshare_expr (lhs);
newexpr = build_gimple_modify_stmt (condstoretemp, lhs);
- name = make_ssa_name (cfun, condstoretemp, newexpr);
+ name = make_ssa_name (condstoretemp, newexpr);
GIMPLE_STMT_OPERAND (newexpr, 0) = name;
mark_symbols_for_renaming (newexpr);
bsi_insert_on_edge (e1, newexpr);
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 1880786d23e..2621dae1abd 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -179,7 +179,7 @@ phiprop_insert_phi (basic_block bb, tree phi, tree use_stmt,
|| TREE_CODE (TREE_TYPE (old_arg)) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (new_var) = 1;
add_referenced_var (new_var);
- new_var = make_ssa_name (cfun, new_var, tmp);
+ new_var = make_ssa_name (new_var, tmp);
GIMPLE_STMT_OPERAND (tmp, 0) = new_var;
bsi_insert_on_edge (e, tmp);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 930c0dc5aad..578997a1b4c 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2454,7 +2454,7 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts,
DECL_GIMPLE_REG_P (temp) = 1;
newexpr = build_gimple_modify_stmt (temp, newexpr);
- name = make_ssa_name (cfun, temp, newexpr);
+ name = make_ssa_name (temp, newexpr);
GIMPLE_STMT_OPERAND (newexpr, 0) = name;
NECESSARY (newexpr) = 0;
@@ -3172,7 +3172,7 @@ insert_fake_stores (void)
}
new_tree = build_gimple_modify_stmt (NULL_TREE, lhs);
- new_lhs = make_ssa_name (cfun, storetemp, new_tree);
+ new_lhs = make_ssa_name (storetemp, new_tree);
GIMPLE_STMT_OPERAND (new_tree, 0) = new_lhs;
create_ssa_artificial_load_stmt (new_tree, stmt, false);
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index da11d9c484b..f257d453f6c 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1220,7 +1220,7 @@ visit_reference_op_load (tree lhs, tree op, tree stmt)
a new SSA_NAME we create. */
if (!result && may_insert)
{
- result = make_ssa_name (cfun, SSA_NAME_VAR (lhs), NULL_TREE);
+ result = make_ssa_name (SSA_NAME_VAR (lhs), NULL_TREE);
/* Initialize value-number information properly. */
VN_INFO_GET (result)->valnum = result;
VN_INFO (result)->expr = val;
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index dded14e0d5f..8d675b43c49 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -71,11 +71,12 @@ unsigned int ssa_name_nodes_created;
zero use default. */
void
-init_ssanames (struct function *the_fun, int size)
+init_ssanames (struct function *fn, int size)
{
if (size < 50)
size = 50;
- SSANAMES (the_fun) = VEC_alloc (tree, gc, size);
+
+ SSANAMES (fn) = VEC_alloc (tree, gc, size);
/* Version 0 is special, so reserve the first slot in the table. Though
currently unused, we may use version 0 in alias analysis as part of
@@ -84,8 +85,8 @@ init_ssanames (struct function *the_fun, int size)
We use VEC_quick_push here because we know that SSA_NAMES has at
least 50 elements reserved in it. */
- VEC_quick_push (tree, SSANAMES (the_fun), NULL_TREE);
- FREE_SSANAMES (the_fun) = NULL;
+ VEC_quick_push (tree, SSANAMES (fn), NULL_TREE);
+ FREE_SSANAMES (fn) = NULL;
}
/* Finalize management of SSA_NAMEs. */
@@ -108,13 +109,13 @@ ssanames_print_statistics (void)
}
#endif
-/* Return an SSA_NAME node for variable VAR defined in statement STMT.
- STMT may be an empty statement for artificial references (e.g., default
- definitions created when a variable is used without a preceding
- definition). */
+/* Return an SSA_NAME node for variable VAR defined in statement STMT
+ in function FN. STMT may be an empty statement for artificial
+ references (e.g., default definitions created when a variable is
+ used without a preceding definition). */
tree
-make_ssa_name (struct function *the_cfun, tree var, tree stmt)
+make_ssa_name_fn (struct function *fn, tree var, tree stmt)
{
tree t;
use_operand_p imm;
@@ -127,10 +128,10 @@ make_ssa_name (struct function *the_cfun, tree var, tree stmt)
|| TREE_CODE (stmt) == PHI_NODE);
/* If our free list has an element, then use it. */
- if (FREE_SSANAMES (the_cfun))
+ if (FREE_SSANAMES (fn))
{
- t = FREE_SSANAMES (the_cfun);
- FREE_SSANAMES (the_cfun) = TREE_CHAIN (FREE_SSANAMES (the_cfun));
+ t = FREE_SSANAMES (fn);
+ FREE_SSANAMES (fn) = TREE_CHAIN (FREE_SSANAMES (fn));
#ifdef GATHER_STATISTICS
ssa_name_nodes_reused++;
#endif
@@ -138,13 +139,13 @@ make_ssa_name (struct function *the_cfun, tree var, tree stmt)
/* The node was cleared out when we put it on the free list, so
there is no need to do so again here. */
gcc_assert (ssa_name (SSA_NAME_VERSION (t)) == NULL);
- VEC_replace (tree, SSANAMES (the_cfun), SSA_NAME_VERSION (t), t);
+ VEC_replace (tree, SSANAMES (fn), SSA_NAME_VERSION (t), t);
}
else
{
t = make_node (SSA_NAME);
- SSA_NAME_VERSION (t) = VEC_length (tree, SSANAMES (the_cfun));
- VEC_safe_push (tree, gc, SSANAMES (the_cfun), t);
+ SSA_NAME_VERSION (t) = VEC_length (tree, SSANAMES (fn));
+ VEC_safe_push (tree, gc, SSANAMES (fn), t);
#ifdef GATHER_STATISTICS
ssa_name_nodes_created++;
#endif
@@ -244,7 +245,7 @@ release_ssa_name (tree var)
tree
duplicate_ssa_name (tree name, tree stmt)
{
- tree new_name = make_ssa_name (cfun, SSA_NAME_VAR (name), stmt);
+ tree new_name = make_ssa_name (SSA_NAME_VAR (name), stmt);
struct ptr_info_def *old_ptr_info = SSA_NAME_PTR_INFO (name);
if (old_ptr_info)
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 954560f2c6d..7481de59325 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -568,7 +568,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
- var = make_ssa_name (cfun, tmp, stmt);
+ var = make_ssa_name (tmp, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
}
@@ -578,7 +578,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
stmt = build_gimple_modify_stmt (NULL_TREE, build2 (PLUS_EXPR, ret_type,
a_acc, var));
- var = make_ssa_name (cfun, SSA_NAME_VAR (a_acc), stmt);
+ var = make_ssa_name (SSA_NAME_VAR (a_acc), stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
a_acc_arg = var;
@@ -589,7 +589,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (MULT_EXPR, ret_type,
m_acc, m));
- var = make_ssa_name (cfun, SSA_NAME_VAR (m_acc), stmt);
+ var = make_ssa_name (SSA_NAME_VAR (m_acc), stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
m_acc_arg = var;
@@ -648,7 +648,7 @@ adjust_return_value (basic_block bb, tree m, tree a)
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
- var = make_ssa_name (cfun, tmp, stmt);
+ var = make_ssa_name (tmp, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_before (&bsi, stmt, BSI_SAME_STMT);
}
@@ -664,7 +664,7 @@ adjust_return_value (basic_block bb, tree m, tree a)
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
- var = make_ssa_name (cfun, tmp, stmt);
+ var = make_ssa_name (tmp, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_before (&bsi, stmt, BSI_SAME_STMT);
}
@@ -917,7 +917,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
if (arg_needs_copy_p (param))
{
tree name = gimple_default_def (cfun, param);
- tree new_name = make_ssa_name (cfun, param, SSA_NAME_DEF_STMT (name));
+ tree new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));
tree phi;
set_default_def (param, new_name);
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 4dc000a1058..c1ce14c4bbb 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -710,7 +710,7 @@ vect_pattern_recog_1 (
pattern_type = TREE_TYPE (pattern_expr);
var = create_tmp_var (pattern_type, "patt");
add_referenced_var (var);
- var_name = make_ssa_name (cfun, var, NULL_TREE);
+ var_name = make_ssa_name (var, NULL_TREE);
pattern_expr = build_gimple_modify_stmt (var_name, pattern_expr);
SSA_NAME_DEF_STMT (var_name) = pattern_expr;
bsi_insert_before (&si, pattern_expr, BSI_SAME_STMT);
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 89fddb9a09d..cc489811006 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -1111,7 +1111,7 @@ vect_create_data_ref_ptr (tree stmt, struct loop *at_loop,
/* Create: p = (vectype *) initial_base */
vec_stmt = fold_convert (vect_ptr_type, new_temp);
vec_stmt = build_gimple_modify_stmt (vect_ptr, vec_stmt);
- vect_ptr_init = make_ssa_name (cfun, vect_ptr, vec_stmt);
+ vect_ptr_init = make_ssa_name (vect_ptr, vec_stmt);
GIMPLE_STMT_OPERAND (vec_stmt, 0) = vect_ptr_init;
new_bb = bsi_insert_on_edge_immediate (pe, vec_stmt);
gcc_assert (!new_bb);
@@ -1253,7 +1253,7 @@ bump_vector_ptr (tree dataref_ptr, tree ptr_incr, block_stmt_iterator *bsi,
incr_stmt = build_gimple_modify_stmt (ptr_var,
build2 (POINTER_PLUS_EXPR, vptr_type,
dataref_ptr, update));
- new_dataref_ptr = make_ssa_name (cfun, ptr_var, incr_stmt);
+ new_dataref_ptr = make_ssa_name (ptr_var, incr_stmt);
GIMPLE_STMT_OPERAND (incr_stmt, 0) = new_dataref_ptr;
vect_finish_stmt_generation (stmt, incr_stmt, bsi);
@@ -1330,7 +1330,7 @@ vect_init_vector (tree stmt, tree vector_var, tree vector_type,
new_var = vect_get_new_vect_var (vector_type, vect_simple_var, "cst_");
add_referenced_var (new_var);
init_stmt = build_gimple_modify_stmt (new_var, vector_var);
- new_temp = make_ssa_name (cfun, new_var, init_stmt);
+ new_temp = make_ssa_name (new_var, init_stmt);
GIMPLE_STMT_OPERAND (init_stmt, 0) = new_temp;
if (bsi)
@@ -1655,7 +1655,7 @@ get_initial_def_for_induction (tree iv_phi)
/* Create: new_name_i = new_name + step_expr */
tmp = fold_build2 (PLUS_EXPR, scalar_type, new_name, step_expr);
init_stmt = build_gimple_modify_stmt (new_var, tmp);
- new_name = make_ssa_name (cfun, new_var, init_stmt);
+ new_name = make_ssa_name (new_var, init_stmt);
GIMPLE_STMT_OPERAND (init_stmt, 0) = new_name;
new_bb = bsi_insert_on_edge_immediate (pe, init_stmt);
@@ -1718,7 +1718,7 @@ get_initial_def_for_induction (tree iv_phi)
new_stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (PLUS_EXPR, vectype,
induc_def, vec_step));
- vec_def = make_ssa_name (cfun, vec_dest, new_stmt);
+ vec_def = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = vec_def;
bsi_insert_before (&si, new_stmt, BSI_SAME_STMT);
set_stmt_info (get_stmt_ann (new_stmt),
@@ -1760,7 +1760,7 @@ get_initial_def_for_induction (tree iv_phi)
/* vec_i = vec_prev + vec_step */
tmp = build2 (PLUS_EXPR, vectype, vec_def, vec_step);
new_stmt = build_gimple_modify_stmt (NULL_TREE, tmp);
- vec_def = make_ssa_name (cfun, vec_dest, new_stmt);
+ vec_def = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = vec_def;
bsi_insert_before (&si, new_stmt, BSI_SAME_STMT);
set_stmt_info (get_stmt_ann (new_stmt),
@@ -2428,7 +2428,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
vec_dest = vect_create_destination_var (scalar_dest, vectype);
tmp = build1 (reduc_code, vectype, PHI_RESULT (new_phi));
epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
- new_temp = make_ssa_name (cfun, vec_dest, epilog_stmt);
+ new_temp = make_ssa_name (vec_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
@@ -2485,13 +2485,13 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
tree bitpos = size_int (bit_offset);
tree tmp = build2 (shift_code, vectype, new_temp, bitpos);
epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
- new_name = make_ssa_name (cfun, vec_dest, epilog_stmt);
+ new_name = make_ssa_name (vec_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_name;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
tmp = build2 (code, vectype, new_name, new_temp);
epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
- new_temp = make_ssa_name (cfun, vec_dest, epilog_stmt);
+ new_temp = make_ssa_name (vec_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
}
@@ -2520,7 +2520,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
bitsize_zero_node);
epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);
- new_temp = make_ssa_name (cfun, new_scalar_dest, epilog_stmt);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
@@ -2534,13 +2534,13 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
bitpos);
epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);
- new_name = make_ssa_name (cfun, new_scalar_dest, epilog_stmt);
+ new_name = make_ssa_name (new_scalar_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_name;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
tmp = build2 (code, scalar_type, new_name, new_temp);
epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, tmp);
- new_temp = make_ssa_name (cfun, new_scalar_dest, epilog_stmt);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
}
@@ -2569,7 +2569,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
rhs = build3 (BIT_FIELD_REF, scalar_type, new_temp, bitsize, bitpos);
epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);
- new_temp = make_ssa_name (cfun, new_scalar_dest, epilog_stmt);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
}
@@ -2596,7 +2596,7 @@ vect_finalize_reduction:
new_dest = vect_create_destination_var (scalar_dest, scalar_type);
}
epilog_stmt = build_gimple_modify_stmt (new_dest, expr);
- new_temp = make_ssa_name (cfun, new_dest, epilog_stmt);
+ new_temp = make_ssa_name (new_dest, epilog_stmt);
GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
bsi_insert_before (&exit_bsi, epilog_stmt, BSI_SAME_STMT);
}
@@ -2984,7 +2984,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
expr = build3 (code, vectype, loop_vec_def0, loop_vec_def1,
reduc_def);
new_stmt = build_gimple_modify_stmt (vec_dest, expr);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3218,7 +3218,7 @@ vectorizable_call (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
rhs = build_function_call_expr (fndecl, vargs);
new_stmt = build_gimple_modify_stmt (vec_dest, rhs);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3267,7 +3267,7 @@ vectorizable_call (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
rhs = build_function_call_expr (fndecl, vargs);
new_stmt = build_gimple_modify_stmt (vec_dest, rhs);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3341,7 +3341,7 @@ vect_gen_widened_results_half (enum tree_code code, tree vectype, tree decl,
expr = build1 (code, vectype, vec_oprnd0);
}
new_stmt = build_gimple_modify_stmt (vec_dest, expr);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3539,7 +3539,7 @@ vectorizable_conversion (tree stmt, block_stmt_iterator *bsi,
/* Arguments are ready. create the new vector stmt. */
new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter,
@@ -3618,7 +3618,7 @@ vectorizable_conversion (tree stmt, block_stmt_iterator *bsi,
/* Arguments are ready. Create the new vector stmt. */
expr = build2 (code1, vectype_out, vec_oprnd0, vec_oprnd1);
new_stmt = build_gimple_modify_stmt (vec_dest, expr);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3720,7 +3720,7 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
for (i = 0; VEC_iterate (tree, vec_oprnds, i, vop); i++)
{
*vec_stmt = build_gimple_modify_stmt (vec_dest, vop);
- new_temp = make_ssa_name (cfun, vec_dest, *vec_stmt);
+ new_temp = make_ssa_name (vec_dest, *vec_stmt);
GIMPLE_STMT_OPERAND (*vec_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt;
@@ -4128,7 +4128,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
new_stmt = build_gimple_modify_stmt (vec_dest,
build1 (code, vectype, vop0));
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
if (slp_node)
@@ -4286,7 +4286,7 @@ vectorizable_type_demotion (tree stmt, block_stmt_iterator *bsi,
/* Arguments are ready. Create the new vector stmt. */
expr = build2 (code1, vectype_out, vec_oprnd0, vec_oprnd1);
new_stmt = build_gimple_modify_stmt (vec_dest, expr);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -4621,7 +4621,7 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
else
tmp = build2 (VEC_INTERLEAVE_LOW_EXPR, vectype, vect1, vect2);
perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
- high = make_ssa_name (cfun, perm_dest, perm_stmt);
+ high = make_ssa_name (perm_dest, perm_stmt);
GIMPLE_STMT_OPERAND (perm_stmt, 0) = high;
vect_finish_stmt_generation (stmt, perm_stmt, bsi);
VEC_replace (tree, *result_chain, 2*j, high);
@@ -4639,7 +4639,7 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
else
tmp = build2 (VEC_INTERLEAVE_HIGH_EXPR, vectype, vect1, vect2);
perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
- low = make_ssa_name (cfun, perm_dest, perm_stmt);
+ low = make_ssa_name (perm_dest, perm_stmt);
GIMPLE_STMT_OPERAND (perm_stmt, 0) = low;
vect_finish_stmt_generation (stmt, perm_stmt, bsi);
VEC_replace (tree, *result_chain, 2*j+1, low);
@@ -5148,7 +5148,7 @@ vect_setup_realignment (tree stmt, block_stmt_iterator *bsi,
&init_addr, &inc, true, NULL_TREE, &inv_p);
data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
new_stmt = build_gimple_modify_stmt (vec_dest, data_ref);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
mark_symbols_for_renaming (new_stmt);
new_bb = bsi_insert_on_edge_immediate (pe, new_stmt);
@@ -5182,7 +5182,7 @@ vect_setup_realignment (tree stmt, block_stmt_iterator *bsi,
vec_dest = vect_create_destination_var (scalar_dest,
TREE_TYPE (new_stmt));
new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
if (compute_in_loop)
@@ -5216,7 +5216,7 @@ vect_setup_realignment (tree stmt, block_stmt_iterator *bsi,
pe = loop_preheader_edge (containing_loop);
vec_dest = vect_create_destination_var (scalar_dest, vectype);
- msq = make_ssa_name (cfun, vec_dest, NULL_TREE);
+ msq = make_ssa_name (vec_dest, NULL_TREE);
phi_stmt = create_phi_node (msq, containing_loop->header);
SSA_NAME_DEF_STMT (msq) = phi_stmt;
add_phi_arg (phi_stmt, msq_init, pe);
@@ -5381,7 +5381,7 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
first_vect, second_vect);
perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
- data_ref = make_ssa_name (cfun, perm_dest, perm_stmt);
+ data_ref = make_ssa_name (perm_dest, perm_stmt);
GIMPLE_STMT_OPERAND (perm_stmt, 0) = data_ref;
vect_finish_stmt_generation (stmt, perm_stmt, bsi);
mark_symbols_for_renaming (perm_stmt);
@@ -5396,7 +5396,7 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
tmp = build2 (VEC_EXTRACT_ODD_EXPR, vectype,
first_vect, second_vect);
perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
- data_ref = make_ssa_name (cfun, perm_dest, perm_stmt);
+ data_ref = make_ssa_name (perm_dest, perm_stmt);
GIMPLE_STMT_OPERAND (perm_stmt, 0) = data_ref;
vect_finish_stmt_generation (stmt, perm_stmt, bsi);
mark_symbols_for_renaming (perm_stmt);
@@ -5823,7 +5823,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr);
vec_dest = vect_create_destination_var (scalar_dest, vectype);
new_stmt = build_gimple_modify_stmt (vec_dest, data_ref);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
copy_virtual_operands (new_stmt, stmt);
@@ -5844,7 +5844,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
}
vec_dest = vect_create_destination_var (scalar_dest, vectype);
new_stmt = build_gimple_modify_stmt (vec_dest, data_ref);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
mark_symbols_for_renaming (new_stmt);
@@ -5861,7 +5861,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
new_stmt = build3 (REALIGN_LOAD_EXPR, vectype, msq, lsq,
realignment_token);
new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -5891,7 +5891,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt,
vec_dest =
vect_create_destination_var (scalar_dest, NULL_TREE);
new_stmt = build_gimple_modify_stmt (vec_dest, vec_inv);
- new_temp = make_ssa_name (cfun, vec_dest, new_stmt);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -6176,7 +6176,7 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
vec_compare, vec_then_clause, vec_else_clause);
*vec_stmt = build_gimple_modify_stmt (vec_dest, vec_cond_expr);
- new_temp = make_ssa_name (cfun, vec_dest, *vec_stmt);
+ new_temp = make_ssa_name (vec_dest, *vec_stmt);
GIMPLE_STMT_OPERAND (*vec_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
@@ -6968,7 +6968,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
sprintf (tmp_name, "%s%d", "addr2int", i);
addr_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
add_referenced_var (addr_tmp);
- addr_tmp_name = make_ssa_name (cfun, addr_tmp, NULL_TREE);
+ addr_tmp_name = make_ssa_name (addr_tmp, NULL_TREE);
addr_stmt = fold_convert (int_ptrsize_type, addr_base);
addr_stmt = build_gimple_modify_stmt (addr_tmp_name, addr_stmt);
SSA_NAME_DEF_STMT (addr_tmp_name) = addr_stmt;
@@ -6982,7 +6982,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
sprintf (tmp_name, "%s%d", "orptrs", i);
or_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
add_referenced_var (or_tmp);
- new_or_tmp_name = make_ssa_name (cfun, or_tmp, NULL_TREE);
+ new_or_tmp_name = make_ssa_name (or_tmp, NULL_TREE);
tmp = build2 (BIT_IOR_EXPR, int_ptrsize_type,
or_tmp_name, addr_tmp_name);
or_stmt = build_gimple_modify_stmt (new_or_tmp_name, tmp);
@@ -7000,7 +7000,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
/* create: and_tmp = or_tmp & mask */
and_tmp = create_tmp_var (int_ptrsize_type, "andmask" );
add_referenced_var (and_tmp);
- and_tmp_name = make_ssa_name (cfun, and_tmp, NULL_TREE);
+ and_tmp_name = make_ssa_name (and_tmp, NULL_TREE);
tmp = build2 (BIT_AND_EXPR, int_ptrsize_type, or_tmp_name, mask_cst);
and_stmt = build_gimple_modify_stmt (and_tmp_name, tmp);
diff --git a/gcc/tree.h b/gcc/tree.h
index 96c29ee5059..d7a667b19e9 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3884,28 +3884,6 @@ extern tree make_tree_binfo_stat (unsigned MEM_STAT_DECL);
extern tree make_tree_vec_stat (int MEM_STAT_DECL);
#define make_tree_vec(t) make_tree_vec_stat (t MEM_STAT_INFO)
-/* Tree nodes for SSA analysis. */
-
-extern void init_phinodes (void);
-extern void fini_phinodes (void);
-extern void release_phi_node (tree);
-#ifdef GATHER_STATISTICS
-extern void phinodes_print_statistics (void);
-#endif
-
-extern void init_ssanames (struct function *, int);
-extern void fini_ssanames (void);
-extern tree make_ssa_name (struct function *, tree, tree);
-extern tree duplicate_ssa_name (tree, tree);
-extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *);
-extern void release_ssa_name (tree);
-extern void release_defs (tree);
-extern void replace_ssa_name_symbol (tree, tree);
-
-#ifdef GATHER_STATISTICS
-extern void ssanames_print_statistics (void);
-#endif
-
/* Return the (unique) IDENTIFIER_NODE node for a given name.
The name is supplied as a char *. */
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 124a3c866b1..33ecded88c3 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1209,8 +1209,8 @@ interesting_stringop_to_profile_p (tree fndecl, tree call)
{
enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl);
- if (fcode != BUILT_IN_MEMSET && fcode != BUILT_IN_MEMCPY
- && fcode != BUILT_IN_BZERO)
+ if (fcode != BUILT_IN_MEMCPY && fcode != BUILT_IN_MEMPCPY
+ && fcode != BUILT_IN_MEMSET && fcode != BUILT_IN_BZERO)
return false;
switch (fcode)
diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog
index 34f5ef7c0ac..7375dbea33b 100644
--- a/gnattools/ChangeLog
+++ b/gnattools/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-13 Arnaud Charlet <charlet@adacore.com>
+
+ PR ada/31808
+ * Makefile.in (gnattools-cross): Do not build vxaddr2line
+
2008-04-05 Arnaud Charlet <charlet@adacore.com>
* Makefile.in: Remove handling of gnatbl.
diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in
index eb90a9fd09f..4c50d6e1cce 100644
--- a/gnattools/Makefile.in
+++ b/gnattools/Makefile.in
@@ -232,11 +232,6 @@ gnattools-cross: $(GCC_DIR)/stamp-tools
$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
$(TOOLS_FLAGS_TO_PASS_CROSS) \
$(GNATTOOLS2_FILES)
- # gnattools4 (cross only)
- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
- $(TOOLS_FLAGS_TO_PASS_CROSS) \
- top_buildir=../../.. \
- ../../vxaddr2line$(exeext)
# Rename cross tools to where the GCC makefile wants them when
# installing. FIXME: installation should be done elsewhere.
if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index b86e22e613d..fc226b452bb 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-13 Tom Tromey <tromey@redhat.com>
+
+ PR preprocessor/22168:
+ * include/cpplib.h (struct cpp_options) <objc>: Update
+ documentation.
+ * expr.c (eval_token): Warn for use of assertions.
+ * directives.c (directive_diagnostics): Warn about extensions.
+ (DEPRECATED): New define.
+ (DIRECTIVE_TABLE): Use it.
+
2008-05-06 Tom Tromey <tromey@redhat.com>
PR preprocessor/35313, PR preprocessor/36088:
diff --git a/libcpp/directives.c b/libcpp/directives.c
index bac08ad2f46..9954796b36a 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -75,6 +75,7 @@ struct pragma_entry
#define INCL (1 << 2)
#define IN_I (1 << 3)
#define EXPAND (1 << 4)
+#define DEPRECATED (1 << 5)
/* Defines one #-directive, including how to handle it. */
typedef void (*directive_handler) (cpp_reader *);
@@ -130,9 +131,9 @@ static void handle_assertion (cpp_reader *, const char *, int);
counts from all the source code I have lying around (egcs and libc
CVS as of 1999-05-18, plus grub-0.5.91, linux-2.2.9, and
pcmcia-cs-3.0.9). This is no longer important as directive lookup
- is now O(1). All extensions other than #warning and #include_next
- are deprecated. The name is where the extension appears to have
- come from. */
+ is now O(1). All extensions other than #warning, #include_next,
+ and #import are deprecated. The name is where the extension
+ appears to have come from. */
#define DIRECTIVE_TABLE \
D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \
@@ -149,11 +150,11 @@ D(error, T_ERROR, STDC89, 0) /* 475 */ \
D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \
D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \
D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) /* 19 */ \
-D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \
+D(ident, T_IDENT, EXTENSION, IN_I | DEPRECATED) /* 11 */ \
D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \
-D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \
-D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \
-D(sccs, T_SCCS, EXTENSION, IN_I) /* 0 SVR4? */
+D(assert, T_ASSERT, EXTENSION, DEPRECATED) /* 0 SVR4 */ \
+D(unassert, T_UNASSERT, EXTENSION, DEPRECATED) /* 0 SVR4 */ \
+D(sccs, T_SCCS, EXTENSION, IN_I | DEPRECATED) /* 0 SVR4? */
/* #sccs is synonymous with #ident. */
#define do_sccs do_ident
@@ -337,11 +338,20 @@ prepare_directive_trad (cpp_reader *pfile)
static void
directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented)
{
- /* Issue -pedantic warnings for extensions. */
- if (CPP_PEDANTIC (pfile)
- && ! pfile->state.skipping
- && dir->origin == EXTENSION)
- cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name);
+ /* Issue -pedantic or deprecated warnings for extensions. We let
+ -pedantic take precedence if both are applicable. */
+ if (! pfile->state.skipping)
+ {
+ if (dir->origin == EXTENSION
+ && !(dir == &dtable[T_IMPORT] && CPP_OPTION (pfile, objc))
+ && CPP_PEDANTIC (pfile))
+ cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name);
+ else if (((dir->flags & DEPRECATED) != 0
+ || (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc)))
+ && CPP_OPTION (pfile, warn_deprecated))
+ cpp_error (pfile, CPP_DL_WARNING, "#%s is a deprecated GCC extension",
+ dir->name);
+ }
/* Traditionally, a directive is ignored unless its # is in
column 1. Therefore in code intended to work with K+R
diff --git a/libcpp/expr.c b/libcpp/expr.c
index af0e2590ee4..2e52617a656 100644
--- a/libcpp/expr.c
+++ b/libcpp/expr.c
@@ -745,10 +745,25 @@ eval_token (cpp_reader *pfile, const cpp_token *token)
}
break;
- default: /* CPP_HASH */
+ case CPP_HASH:
+ if (!pfile->state.skipping)
+ {
+ /* A pedantic warning takes precedence over a deprecated
+ warning here. */
+ if (CPP_PEDANTIC (pfile))
+ cpp_error (pfile, CPP_DL_PEDWARN,
+ "assertions are a GCC extension");
+ else if (CPP_OPTION (pfile, warn_deprecated))
+ cpp_error (pfile, CPP_DL_WARNING,
+ "assertions are a deprecated extension");
+ }
_cpp_test_assertion (pfile, &temp);
result.high = 0;
result.low = temp;
+ break;
+
+ default:
+ abort ();
}
result.unsignedp = !!unsignedp;
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 46ab14603ed..6b3f7615c57 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -1,6 +1,6 @@
/* Definitions for CPP library.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2007
+ 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
@@ -275,8 +275,9 @@ struct cpp_options
/* Nonzero means handle cplusplus style comments. */
unsigned char cplusplus_comments;
- /* Nonzero means define __OBJC__, treat @ as a special token, and
- use the OBJC[PLUS]_INCLUDE_PATH environment variable. */
+ /* Nonzero means define __OBJC__, treat @ as a special token, use
+ the OBJC[PLUS]_INCLUDE_PATH environment variable, and allow
+ "#import". */
unsigned char objc;
/* Nonzero means don't copy comments into the output file. */
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 62b00bc121a..5be3cae4fa1 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/36202
+ * io/list_read (eat_separator): Handle the CR-LF case correctly.
+
2008-05-09 Julian Brown <julian@codesourcery.com>
* Makefile.am (LTLDFLAGS): New.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 802bf9e7706..d3e932e4074 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -347,20 +347,12 @@ eat_separator (st_parameter_dt *dtp)
case '\r':
dtp->u.p.at_eol = 1;
n = next_char(dtp);
- if (n == '\n')
+ if (n != '\n')
{
- if (dtp->u.p.namelist_mode)
- {
- do
- c = next_char (dtp);
- while (c == '\n' || c == '\r' || c == ' ');
- unget_char (dtp, c);
- }
+ unget_char (dtp, n);
+ break;
}
- else
- unget_char (dtp, n);
- break;
-
+ /* Fall through. */
case '\n':
dtp->u.p.at_eol = 1;
if (dtp->u.p.namelist_mode)
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6bc43b87a58..1b2e4fa7257 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,28 @@
+2008-05-13 David Daney <ddaney@avtrex.com>
+
+ * config/cpu/mips/atomicity.h: Remove file.
+ * config/cpu/mips: Remove directory.
+ * configure.host: Remove host specific handling for mips*-*-*.
+
+2008-05-12 Stefano Soffia <soffia@cs.unipr.it>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/debug/vector (vector<>::_M_requires_reallocation): Just
+ use this->capacity().
+ (vector<>::capacity): Move non-pedantic / pedantic logic here.
+ * testsuite/23_containers/vector/
+ debug_mode_requires_reallocation-2.cc: New.
+
+ * testsuite/23_containers/vector/debug_mode_requires_reallocation.cc:
+ Rename to debug_mode_requires_reallocation-1.cc
+
+2008-05-10 Roberto Bagnara <bagnara@cs.unipr.it>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/debug/vector (vector<>::_M_requires_reallocation): Fix macro.
+ * testsuite/23_containers/vector/debug_mode_requires_reallocation.cc:
+ New.
+
2008-05-07 Johannes Singler <singler@ira.uka.de>
* include/parallel/quicksort.h:
diff --git a/libstdc++-v3/config/cpu/mips/atomicity.h b/libstdc++-v3/config/cpu/mips/atomicity.h
deleted file mode 100644
index 2989fa44278..00000000000
--- a/libstdc++-v3/config/cpu/mips/atomicity.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Low-level functions for atomic operations: MIPS version -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
-// 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 2, 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 COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <ext/atomicity.h>
-
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- // NB: MIPS II or above required.
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- {
- _Atomic_word __result, __tmp;
-
- __asm__ __volatile__
- ("/* Inline exchange & add */\n\t"
- "1:\n\t"
- ".set push\n\t"
-#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-#endif
- "ll %0,0(%2)\n\t"
- "addu %1,%3,%0\n\t"
- "sc %1,0(%2)\n\t"
- ".set pop\n\t"
- "beqz %1,1b\n\t"
- "/* End exchange & add */"
- : "=&r"(__result), "=&r"(__tmp)
- : "r"(__mem), "r"(__val)
- : "memory" );
-
- return __result;
- }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- {
- _Atomic_word __result;
-
- __asm__ __volatile__
- ("/* Inline atomic add */\n\t"
- "1:\n\t"
- ".set push\n\t"
-#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-#endif
- "ll %0,0(%1)\n\t"
- "addu %0,%2,%0\n\t"
- "sc %0,0(%1)\n\t"
- ".set pop\n\t"
- "beqz %0,1b\n\t"
- "/* End atomic add */"
- : "=&r"(__result)
- : "r"(__mem), "r"(__val)
- : "memory" );
- }
-
-_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index c994b5e7145..842e1c19b39 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -321,15 +321,6 @@ case "${host}" in
fi
esac
;;
- mips*-*-*)
- case "${host_os}" in
- gnu* | linux* | irix*)
- ;;
- *)
- atomicity_dir="cpu/generic"
- ;;
- esac
- ;;
powerpc*-*-darwin*)
port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver"
;;
diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector
index 672cb81ad9d..7945b54591e 100644
--- a/libstdc++-v3/include/debug/vector
+++ b/libstdc++-v3/include/debug/vector
@@ -1,6 +1,6 @@
// Debugging vector implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -216,7 +216,16 @@ namespace __debug
this->_M_invalidate_all();
}
- using _Base::capacity;
+ size_type
+ capacity() const
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ return _M_guaranteed_capacity;
+#else
+ return _Base::capacity();
+#endif
+ }
+
using _Base::empty;
void
@@ -442,13 +451,7 @@ namespace __debug
bool
_M_requires_reallocation(size_type __elements)
- {
-#ifdef _GLIBCXX_DEBUG_PEDANTIC
- return __elements > this->capacity();
-#else
- return __elements > _M_guaranteed_capacity;
-#endif
- }
+ { return __elements > this->capacity(); }
void
_M_update_guaranteed_capacity()
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-1.cc b/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-1.cc
new file mode 100644
index 00000000000..079a70f497b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-1.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2008 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+
+#include <vector>
+#include <algorithm>
+#include <iterator>
+
+// http://gcc.gnu.org/ml/libstdc++/2008-05/msg00039.html
+void test01()
+{
+ typedef std::vector<unsigned> array_t;
+ typedef std::back_insert_iterator<array_t> bii_t;
+
+ array_t a;
+
+ // Push 5 elements.
+ a.push_back(0);
+ a.push_back(1);
+ a.push_back(2);
+ a.push_back(3);
+ a.push_back(4);
+ // Ensure that there is enough space for other two elements.
+ // (2 + 5 = 7)
+ if (a.capacity() < 7)
+ a.reserve(7);
+ // Add two new elements.
+ std::copy(a.begin(), a.begin() + 2, bii_t(a));
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-2.cc b/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-2.cc
new file mode 100644
index 00000000000..a09be47fd17
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/debug_mode_requires_reallocation-2.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2008 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" }
+
+#include <vector>
+#include <algorithm>
+#include <iterator>
+
+// http://gcc.gnu.org/ml/libstdc++/2008-05/msg00046.html
+void test01()
+{
+ typedef std::vector<unsigned> array_t;
+ typedef std::back_insert_iterator<array_t> bii_t;
+
+ array_t a;
+
+ // Push 5 elements.
+ a.push_back(0);
+ a.push_back(1);
+ a.push_back(2);
+ a.push_back(3);
+ a.push_back(4);
+ // Ensure that there is enough space for other two elements.
+ // (2 + 5 = 7)
+ if (a.capacity() < 7)
+ a.reserve(7);
+ // Add two new elements.
+ std::copy(a.begin(), a.begin() + 2, bii_t(a));
+}
+
+int main()
+{
+ test01();
+ return 0;
+}