summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-15 17:13:38 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-15 17:13:38 +0000
commitced7497a9b2ebb88aa20213e4e9482842eb461c7 (patch)
treee20c89c32f293d819302b6b60bd11edbe46475ff
parentc626c35a1768530e1d69f0837daa9d59ed9518a3 (diff)
downloadgcc-ced7497a9b2ebb88aa20213e4e9482842eb461c7.tar.gz
2010-02-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156774 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@156777 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.MELT4
-rw-r--r--MAINTAINERS4
-rwxr-xr-xconfigure17
-rw-r--r--configure.ac17
-rw-r--r--gcc/ChangeLog132
-rw-r--r--gcc/ChangeLog.graphite47
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/c-pch.c3
-rw-r--r--gcc/caller-save.c2
-rw-r--r--gcc/cfgexpand.c3
-rw-r--r--gcc/cgraphunit.c6
-rw-r--r--gcc/collect2.c26
-rw-r--r--gcc/collect2.h1
-rw-r--r--gcc/config/darwin.h2
-rw-r--r--gcc/config/darwin9.h2
-rw-r--r--gcc/config/h8300/h8300.c22
-rw-r--r--gcc/config/mn10300/mn10300.h2
-rw-r--r--gcc/config/s390/s390.c10
-rw-r--r--gcc/cp/ChangeLog23
-rw-r--r--gcc/cp/name-lookup.c6
-rw-r--r--gcc/cp/name-lookup.h2
-rw-r--r--gcc/cp/semantics.c1
-rw-r--r--gcc/cp/tree.c4
-rw-r--r--gcc/dwarf2out.c184
-rw-r--r--gcc/fortran/ChangeLog37
-rw-r--r--gcc/fortran/decl.c10
-rw-r--r--gcc/fortran/resolve.c1
-rw-r--r--gcc/fortran/trans-array.c41
-rw-r--r--gcc/fortran/trans-io.c18
-rw-r--r--gcc/fortran/trans-stmt.c28
-rw-r--r--gcc/fortran/trans-stmt.h5
-rw-r--r--gcc/fortran/trans.c29
-rw-r--r--gcc/gcc.c29
-rw-r--r--gcc/graphite-clast-to-gimple.c7
-rw-r--r--gcc/graphite-clast-to-gimple.h2
-rw-r--r--gcc/graphite-poly.c2
-rw-r--r--gcc/graphite-poly.h7
-rw-r--r--gcc/graphite-scop-detection.c1
-rw-r--r--gcc/graphite-sese-to-poly.c44
-rw-r--r--gcc/graphite.c19
-rw-r--r--gcc/intl.c13
-rw-r--r--gcc/intl.h5
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-elf.c30
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/sv.po312
-rw-r--r--gcc/reload1.c16
-rw-r--r--gcc/reorg.c9
-rw-r--r--gcc/rtl.def2
-rw-r--r--gcc/sel-sched-dump.c2
-rw-r--r--gcc/sese.c59
-rw-r--r--gcc/sese.h1
-rw-r--r--gcc/testsuite/ChangeLog61
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-opt.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic99.C22
-rw-r--r--gcc/testsuite/g++.dg/graphite/pr42930.C55
-rw-r--r--gcc/testsuite/g++.dg/opt/ice1.C41
-rw-r--r--gcc/testsuite/g++.dg/other/default3.C2
-rw-r--r--gcc/testsuite/g++.dg/torture/pr43068.C10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr42998.c15
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr42530.c18
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr42771.c19
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr42914.c21
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr43012.c74
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.h6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-3.c12
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_6.f9057
-rw-r--r--gcc/tree-ssa-alias.c78
-rw-r--r--gcc/tree-ssa-loop-ivopts.c15
-rw-r--r--gcc/tree-ssa-pre.c12
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/init.c6
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/arm/sysv.S3
-rw-r--r--libstdc++-v3/ChangeLog49
-rw-r--r--libstdc++-v3/include/bits/hashtable.h76
-rw-r--r--libstdc++-v3/include/debug/unordered_map34
-rw-r--r--libstdc++-v3/include/debug/unordered_set34
-rw-r--r--libstdc++-v3/include/std/future22
-rw-r--r--libstdc++-v3/include/std/thread2
-rw-r--r--libstdc++-v3/libsupc++/nested_exception.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/erase/24061-map.cc21
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/24061-multimap.cc20
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc20
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/erase/24061-set.cc21
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/42819.cc59
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/util/exception/safety.h24
98 files changed, 1645 insertions, 591 deletions
diff --git a/ChangeLog b/ChangeLog
index fcb144f107d..f10582a3293 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ PR 11238
+ * configure.ac: Delete config.cache files in sub-directories when
+ deleting Makefiles.
+ * configure: Regenerate.
+
+2010-02-12 Ben Elliston <bje@gnu.org>
+
+ * MAINTAINERS: Update my email address.
+
2010-02-08 Andrew Pinski <pinskia@gmail.com>
* MAINTAINERS (spu port): Update my email address.
diff --git a/ChangeLog.MELT b/ChangeLog.MELT
index 6a1880842d3..170acd921a7 100644
--- a/ChangeLog.MELT
+++ b/ChangeLog.MELT
@@ -1,4 +1,8 @@
+2010-02-15 Basile Starynkevitch <basile@starynkevitch.net>
+
+ MELT branch merged with trunk rev 156774
+
2010-02-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156678
diff --git a/MAINTAINERS b/MAINTAINERS
index a1e95cf564b..7978eeab1a0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -149,7 +149,7 @@ objective-c/c++ Stan Shebs stanshebs@earthlink.net
libcpp Per Bothner per@bothner.com
libcpp All C and C++ front end maintainers
fp-bit Ian Lance Taylor ian@airs.com
-libdecnumber Ben Elliston bje@au.ibm.com
+libdecnumber Ben Elliston bje@gnu.org
libgcc Ian Lance Taylor ian@airs.com
libgcj Tom Tromey tromey@redhat.com
libgcj Bryce McKinlay mckinlay@redhat.com
@@ -224,7 +224,7 @@ type-safe vectors Nathan Sidwell nathan@codesourcery.com
alias analysis Daniel Berlin dberlin@dberlin.org
reload Ulrich Weigand uweigand@de.ibm.com
reload Bernd Schmidt bernd.schmidt@analog.com
-dfp.c, related Ben Elliston bje@au.ibm.com
+dfp.c, related Ben Elliston bje@gnu.org
RTL optimizers Eric Botcazou ebotcazou@libertysurf.fr
auto-vectorizer Richard Guenther rguenther@suse.de
auto-vectorizer Zdenek Dvorak ook@ucw.cz
diff --git a/configure b/configure
index 1f9785e6319..c82c7d5559e 100755
--- a/configure
+++ b/configure
@@ -7637,6 +7637,12 @@ for module in ${build_configdirs} ; do
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
+ # PR 11238: Also remove config.cache files.
+ if test -z "${no_recursion}" \
+ && test -f ${build_subdir}/${module}/config.cache; then
+ echo 1>&2 "*** removing ${build_subdir}/${module}/config.cache to allow reconfigure"
+ rm -f ${build_subdir}/${module}/config.cache
+ fi
extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
@@ -7652,6 +7658,11 @@ for module in ${configdirs} ; do
rm -f ${file}
fi
done
+ # PR 11238: Also remove config.cache files.
+ if test -f ${module}/config.cache; then
+ echo 1>&2 "*** removing ${module}/config.cache to allow reconfigure"
+ rm -f ${module}/config.cache
+ fi
fi
extrasub_host="$extrasub_host
/^@if $module\$/d
@@ -7666,6 +7677,12 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
+ # PR 11238: Also remove config.cache files.
+ if test -z "${no_recursion}" \
+ && test -f ${target_subdir}/${module}/config.cache; then
+ echo 1>&2 "*** removing ${target_subdir}/${module}/config.cache to allow reconfigure"
+ rm -f ${target_subdir}/${module}/config.cache
+ fi
# We only bootstrap target libraries listed in bootstrap_target_libs.
case $bootstrap_target_libs in
diff --git a/configure.ac b/configure.ac
index f14bfd753eb..b5d4313ab9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2726,6 +2726,12 @@ for module in ${build_configdirs} ; do
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
+ # PR 11238: Also remove config.cache files.
+ if test -z "${no_recursion}" \
+ && test -f ${build_subdir}/${module}/config.cache; then
+ echo 1>&2 "*** removing ${build_subdir}/${module}/config.cache to allow reconfigure"
+ rm -f ${build_subdir}/${module}/config.cache
+ fi
extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
@@ -2741,6 +2747,11 @@ for module in ${configdirs} ; do
rm -f ${file}
fi
done
+ # PR 11238: Also remove config.cache files.
+ if test -f ${module}/config.cache; then
+ echo 1>&2 "*** removing ${module}/config.cache to allow reconfigure"
+ rm -f ${module}/config.cache
+ fi
fi
extrasub_host="$extrasub_host
/^@if $module\$/d
@@ -2755,6 +2766,12 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
+ # PR 11238: Also remove config.cache files.
+ if test -z "${no_recursion}" \
+ && test -f ${target_subdir}/${module}/config.cache; then
+ echo 1>&2 "*** removing ${target_subdir}/${module}/config.cache to allow reconfigure"
+ rm -f ${target_subdir}/${module}/config.cache
+ fi
# We only bootstrap target libraries listed in bootstrap_target_libs.
case $bootstrap_target_libs in
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0a9a4d764c9..72c02ef4a8a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,135 @@
+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ * config/h8300/h8300.c: (h8300_push_pop): Use bool type for
+ boolean parameters. Use emit_jump_insn when emitting a pop
+ instruction containing a return insn.
+ (push): Use 'true' rather than '1' as second parameter to F.
+ (h8300_expand_prologue): Likewise.
+ Use 'true' and 'false' for boolean parameters to
+ h8300_push_pop.
+ (h8300_expand_epilogue): Likewise.
+
+2010-02-15 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/43068
+ * cgraphunit.c (thunk_adjust): Skip adjusting by fixed_offset
+ if that is zero.
+
+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ * config/mn10300/mn10300.h (FUNCTION_ARG_REGNO_P): Revert previous
+ delta.
+
+2010-02-14 Marco Poletti <poletti.marco@gmail.com>
+
+ * intl.c (fake_ngettext): New function.
+ * intl.h (fake_ngettext): Declare.
+ (ngettext): Define macro.
+ * collect2.c (notice_translated): New function.
+ (main): Use notice_translated and ngettext.
+ * collect2.h (notice_translated): Declare.
+
+2010-02-14 Steven Bosscher <steven@gcc.gnu.org>
+
+ * reorg.c (delete_computation): Comment fixes.
+ * caller-save.c (setup_save_areas): Idem.
+ * sel-sched-dump.c (dump_lv_set): Idem.
+ * rtl.def: Idem.
+
+2010-02-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/s390/s390.c (s390_sched_init): New function.
+ (TARGET_SCHED_INIT): Target hook defined.
+
+2010-02-12 Dave Korn <dave.korn.cygwin@gmail.com>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+ Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
+
+ PR target/42982
+ Partial revert of unintended change in fix for PR41605.
+ * config/darwin.h: Fix typo.
+ * config/darwin9.h: Same.
+
+2010-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-pch.c (pch_init): Clear v.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42930
+ * graphite-scop-detection.c (graphite_can_represent_scev): Call
+ graphite_can_represent_init for MULT_EXPR.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42914
+ PR middle-end/42530
+ * graphite-sese-to-poly.c (remove_phi): New.
+ (translate_scalar_reduction_to_array): Call remove_phi.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42771
+ * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
+ * graphite-clast-to-gimple.h (gloog): Update declaration.
+ * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
+ * graphite-poly.h (struct poly_bb): Add missing comments.
+ (struct scop): Add poly_scop_p field.
+ (POLY_SCOP_P): New.
+ * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
+ * graphite.c (graphite_transform_loops): Build the polyhedral
+ representation for each scop before code generation.
+ * sese.c (rename_variables_in_operand): Removed.
+ (rename_variables_in_expr): Return the renamed expression.
+ (rename_sese_parameters): New.
+ * sese.h (rename_sese_parameters): Declared.
+
+2010-02-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/42998
+ * tree-ssa-pre.c (create_expression_by_pieces): Treat
+ POINTER_PLUS_EXPR properly.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+ Changpeng Fang <changpeng.fang@amd.com>
+
+ PR middle-end/40886
+ * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Decrement
+ the cost of an IV candidate when the IV is used in a test against zero.
+
+ * gcc.dg/tree-ssa/ivopts-3.c: New.
+
+2010-02-11 Richard Guenther <rguenther@suse.de>
+
+ PR lto/41664
+ * tree-ssa-alias.c (refs_may_alias_p_1): Canonicalize
+ pointer-vs-decl case by swapping refs. Handle some cases
+ of pointer-vs-decl disambiguations more conservatively.
+ * cfgexpand.c (gimple_expand_cfg): Set gimple_df->in_ssa_p
+ to false after expanding.
+
+2010-02-11 Richard Guenther <rguenther@suse.de>
+
+ PR driver/43021
+ * gcc.c (process_command): Handle LTO file@offset case more
+ appropriately.
+
+2010-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ * reload1.c (eliminate_regs_1): If insn is DEBUG_INSN, avoid any
+ modifications outside of the DEBUG_INSN. Accept CLOBBERs inside
+ of DEBUG_INSNs.
+ (eliminate_regs_in_insn): Eliminate regs even in DEBUG_INSNs.
+
+ * dwarf2out.c (mem_loc_descriptor) <case MEM>: Use DW_OP_deref_size
+ if MEM's mode size isn't DWARF2_ADDR_SIZE.
+ (mem_loc_descriptor) <do_scompare>: Allow also VOIDmode arguments.
+ Optimize eq/ne comparisons when both arguments are known to be
+ zero-extended.
+ (mem_loc_descriptor) <do_ucompare>: Allow also VOIDmode arguments.
+ Don't mask operands unnecessarily if they are known to be already
+ zero-extended.
+
2010-02-10 Vladimir Makarov <vmakarov@redhat.com>
* ira-conflicts.c (add_insn_allocno_copies): Use find_reg_note
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index d563ad369a5..4bb6dc26619 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,50 @@
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/43012
+ * gcc.dg/graphite/pr43012.c: New.
+
+2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
+2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
+
+ * g++.dg/graphite/pr42930.C: New.
+
+2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42930
+ * graphite-scop-detection.c (graphite_can_represent_scev): Call
+ graphite_can_represent_init for MULT_EXPR.
+
+2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42914
+ PR middle-end/42530
+ * graphite-sese-to-poly.c (remove_phi): New.
+ (translate_scalar_reduction_to_array): Call remove_phi.
+
+ * gcc.dg/graphite/pr42530.c: New.
+ * gcc.dg/graphite/pr42914.c: New.
+
+2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42771
+ * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
+ * graphite-clast-to-gimple.h (gloog): Update declaration.
+ * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
+ * graphite-poly.h (struct poly_bb): Add missing comments.
+ (struct scop): Add poly_scop_p field.
+ (POLY_SCOP_P): New.
+ * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
+ * graphite.c (graphite_transform_loops): Build the polyhedral
+ representation for each scop before code generation.
+ * sese.c (rename_variables_in_operand): Removed.
+ (rename_variables_in_expr): Return the renamed expression.
+ (rename_sese_parameters): New.
+ * sese.h (rename_sese_parameters): Declared.
+
+ * gcc.dg/graphite/pr42771.c: New.
+
2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index d006eb0044e..ed6977ec8f8 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20100211
+20100215
diff --git a/gcc/c-pch.c b/gcc/c-pch.c
index abdf4ab4677..8433f8633dd 100644
--- a/gcc/c-pch.c
+++ b/gcc/c-pch.c
@@ -1,5 +1,5 @@
/* Precompiled header implementation for the C languages.
- Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -134,6 +134,7 @@ pch_init (void)
gcc_assert (memcmp (executable_checksum, no_checksum, 16) != 0);
+ memset (&v, '\0', sizeof (v));
v.debug_info_type = write_symbols;
{
size_t i;
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index e12deb73ead..a6faeea1969 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -549,7 +549,7 @@ setup_save_areas (void)
CLEAR_HARD_REG_SET (this_insn_sets);
note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets);
/* Sibcalls are considered to set the return value,
- compare flow.c:propagate_one_insn. */
+ compare df-scan.c:df_get_call_refs. */
if (SIBLING_CALL_P (insn) && crtl->return_rtx)
mark_set_regs (crtl->return_rtx, NULL_RTX, &this_insn_sets);
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 788242c3d82..a0d4ba52b12 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3639,6 +3639,9 @@ gimple_expand_cfg (void)
execute_free_datastructures ();
finish_out_of_ssa (&SA);
+ /* We are no longer in SSA form. */
+ cfun->gimple_df->in_ssa_p = false;
+
/* Expansion is used by optimization passes too, set maybe_hot_insn_p
conservatively to true until they are all profile aware. */
pointer_map_destroy (lab_rtx_for_bb);
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 9cd5f16f488..ec7f9d8fc33 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1230,7 +1230,8 @@ thunk_adjust (gimple_stmt_iterator * bsi,
gimple stmt;
tree ret;
- if (this_adjusting)
+ if (this_adjusting
+ && fixed_offset != 0)
{
stmt = gimple_build_assign (ptr,
fold_build2_loc (input_location,
@@ -1315,7 +1316,8 @@ thunk_adjust (gimple_stmt_iterator * bsi,
offsettmp);
}
- if (!this_adjusting)
+ if (!this_adjusting
+ && fixed_offset != 0)
/* Adjust the pointer by the constant. */
{
tree ptrtmp;
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 914015f06f9..120369a2662 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -430,6 +430,17 @@ notice (const char *cmsgid, ...)
va_end (ap);
}
+/* Notify user of a non-error, without translating the format string. */
+void
+notice_translated (const char *cmsgid, ...)
+{
+ va_list ap;
+
+ va_start (ap, cmsgid);
+ vfprintf (stderr, cmsgid, ap);
+ va_end (ap);
+}
+
/* Die when sys call fails. */
void
@@ -1809,9 +1820,18 @@ main (int argc, char **argv)
if (debug)
{
- notice ("%d constructor(s) found\n", constructors.number);
- notice ("%d destructor(s) found\n", destructors.number);
- notice ("%d frame table(s) found\n", frame_tables.number);
+ notice_translated (ngettext ("%d constructor found\n",
+ "%d constructors found\n",
+ constructors.number),
+ constructors.number);
+ notice_translated (ngettext ("%d destructor found\n",
+ "%d destructors found\n",
+ destructors.number),
+ destructors.number);
+ notice_translated (ngettext("%d frame table found\n",
+ "%d frame tables found\n",
+ frame_tables.number),
+ frame_tables.number);
}
/* If the scan exposed nothing of special interest, there's no need to
diff --git a/gcc/collect2.h b/gcc/collect2.h
index 81113cfb68b..4095734accc 100644
--- a/gcc/collect2.h
+++ b/gcc/collect2.h
@@ -41,6 +41,7 @@ extern char *temporary_firstobj;
extern int vflag, debug;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
+extern void notice_translated (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void fatal_perror (const char *, ...)
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 6595e53bda2..c42bf34a255 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -272,7 +272,7 @@ extern GTY(()) int darwin_ms_struct;
%{A} %{e*} %{m} %{r} %{x} \
%{o*}%{!o:-o a.out} \
%{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
- %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
+ %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
%{!nostdlib:%{!nodefaultlibs: %(link_ssp) %G %L }} \
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
index ff34a5dddea..b8c8a21e371 100644
--- a/gcc/config/darwin9.h
+++ b/gcc/config/darwin9.h
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see
%{A} %{e*} %{m} %{r} %{x} \
%{o*}%{!o:-o a.out} \
%{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
- %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
+ %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
%{!nostdlib:%{!nodefaultlibs: %(link_ssp) %G %L }} \
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index e9e2216c270..7df015cf33c 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -98,7 +98,7 @@ static void h8300_asm_named_section (const char *, unsigned int, tree);
#endif
static int h8300_and_costs (rtx);
static int h8300_shift_costs (rtx);
-static void h8300_push_pop (int, int, int, int);
+static void h8300_push_pop (int, int, bool, bool);
static int h8300_stack_offset_p (rtx, int);
static int h8300_ldm_stm_regno (rtx, int, int, int);
static void h8300_reorg (void);
@@ -623,7 +623,7 @@ push (int rn)
x = gen_push_h8300hs_advanced (reg);
else
x = gen_push_h8300hs_normal (reg);
- x = F (emit_insn (x), 1);
+ x = F (emit_insn (x), true);
REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
}
@@ -662,7 +662,7 @@ pop (int rn)
(set sp (plus sp (const_int adjust)))] */
static void
-h8300_push_pop (int regno, int nregs, int pop_p, int return_p)
+h8300_push_pop (int regno, int nregs, bool pop_p, bool return_p)
{
int i, j;
rtvec vec;
@@ -680,7 +680,7 @@ h8300_push_pop (int regno, int nregs, int pop_p, int return_p)
/* We need one element for the return insn, if present, one for each
register, and one for stack adjustment. */
- vec = rtvec_alloc ((return_p != 0) + nregs + 1);
+ vec = rtvec_alloc ((return_p ? 1 : 0) + nregs + 1);
sp = stack_pointer_rtx;
i = 0;
@@ -720,7 +720,11 @@ h8300_push_pop (int regno, int nregs, int pop_p, int return_p)
x = gen_rtx_PARALLEL (VOIDmode, vec);
if (!pop_p)
x = Fpa (x);
- emit_insn (x);
+
+ if (return_p)
+ emit_jump_insn (x);
+ else
+ emit_insn (x);
}
/* Return true if X has the value sp + OFFSET. */
@@ -855,7 +859,7 @@ h8300_expand_prologue (void)
{
/* Push fp. */
push (HARD_FRAME_POINTER_REGNUM);
- F (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx), 1);
+ F (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx), true);
}
/* Push the rest of the registers in ascending order. */
@@ -881,7 +885,7 @@ h8300_expand_prologue (void)
n_regs = 2;
}
- h8300_push_pop (regno, n_regs, 0, 0);
+ h8300_push_pop (regno, n_regs, false, false);
}
}
@@ -954,7 +958,7 @@ h8300_expand_epilogue (void)
&& (saved_regs & ((1 << (regno - n_regs + 1)) - 1)) == 0)
returned_p = true;
- h8300_push_pop (regno - n_regs + 1, n_regs, 1, returned_p);
+ h8300_push_pop (regno - n_regs + 1, n_regs, true, returned_p);
}
}
@@ -963,7 +967,7 @@ h8300_expand_epilogue (void)
{
if (TARGET_H8300SX)
returned_p = true;
- h8300_push_pop (HARD_FRAME_POINTER_REGNUM, 1, 1, returned_p);
+ h8300_push_pop (HARD_FRAME_POINTER_REGNUM, 1, true, returned_p);
}
if (!returned_p)
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 5547d4e17e5..be6a8528fbd 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -514,7 +514,7 @@ enum reg_class {
/* 1 if N is a possible register number for function argument passing.
On the MN10300, d0 and d1 are used in this way. */
-#define FUNCTION_ARG_REGNO_P(N) ((N) <= 2)
+#define FUNCTION_ARG_REGNO_P(N) ((N) <= 1)
/* Define a data type for recording info about an argument list
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 17c6a23d853..dc135b2b08e 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -10160,6 +10160,14 @@ s390_sched_variable_issue (FILE *file ATTRIBUTE_UNUSED,
return more;
}
+static void
+s390_sched_init (FILE *file ATTRIBUTE_UNUSED,
+ int verbose ATTRIBUTE_UNUSED,
+ int max_ready ATTRIBUTE_UNUSED)
+{
+ last_scheduled_insn = NULL_RTX;
+}
+
/* Initialize GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
@@ -10220,6 +10228,8 @@ s390_sched_variable_issue (FILE *file ATTRIBUTE_UNUSED,
#define TARGET_SCHED_VARIABLE_ISSUE s390_sched_variable_issue
#undef TARGET_SCHED_REORDER
#define TARGET_SCHED_REORDER s390_sched_reorder
+#undef TARGET_SCHED_INIT
+#define TARGET_SCHED_INIT s390_sched_init
#undef TARGET_CANNOT_COPY_INSN_P
#define TARGET_CANNOT_COPY_INSN_P s390_cannot_copy_insn_p
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f42f59e5ce6..0b96f4c8fbf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,26 @@
+2010-02-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/41997
+ * semantics.c (finish_compound_literal): Use
+ cp_apply_type_quals_to_decl when creating a static variable.
+
+2010-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/43024
+ * name-lookup.h (current_binding_level): Check for null
+ cp_function_chain.
+
+2010-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/43054
+ * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
+
+2010-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/43033
+ * name-lookup.c (pushdecl_maybe_friend): Check default args of t
+ instead of x.
+
2010-02-10 Jason Merrill <jason@redhat.com>
PR c++/41896
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 8f693464875..1f595c0eb92 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -1,5 +1,5 @@
/* Definitions for C++ name lookup routines.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
@@ -853,8 +853,8 @@ pushdecl_maybe_friend (tree x, bool is_friend)
add_decl_to_level (x, NAMESPACE_LEVEL (CP_DECL_CONTEXT (t)));
}
- if (TREE_CODE (x) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (x))
- check_default_args (x);
+ if (TREE_CODE (t) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (t))
+ check_default_args (t);
if (t != x || DECL_FUNCTION_TEMPLATE_P (t))
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 7a3625a2926..08514810ab0 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -259,7 +259,7 @@ struct GTY(()) cp_binding_level {
/* The binding level currently in effect. */
#define current_binding_level \
- (*(cfun && cp_function_chain->bindings \
+ (*(cfun && cp_function_chain && cp_function_chain->bindings \
? &cp_function_chain->bindings \
: &scope_chain->bindings))
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 985e2c0f464..90a76d9391c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2257,6 +2257,7 @@ finish_compound_literal (tree type, tree compound_literal)
tree decl = create_temporary_var (type);
DECL_INITIAL (decl) = compound_literal;
TREE_STATIC (decl) = 1;
+ cp_apply_type_quals_to_decl (cp_type_quals (type), decl);
decl = pushdecl_top_level (decl);
DECL_NAME (decl) = make_anon_name ();
SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl));
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 678c7dd8787..d2ab4f0f679 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2060,7 +2060,9 @@ cp_tree_equal (tree t1, tree t2)
arg2 = next_call_expr_arg (&iter2))
if (!cp_tree_equal (arg1, arg2))
return false;
- return (arg1 || arg2);
+ if (arg1 || arg2)
+ return false;
+ return true;
}
case TARGET_EXPR:
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 96b0c9fb56b..c617a44da32 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12990,7 +12990,19 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
if (mem_loc_result == NULL)
mem_loc_result = tls_mem_loc_descriptor (rtl);
if (mem_loc_result != 0)
- add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_deref, 0, 0));
+ {
+ if (GET_MODE_SIZE (GET_MODE (rtl)) > DWARF2_ADDR_SIZE)
+ {
+ expansion_failed (NULL_TREE, rtl, "DWARF address size mismatch");
+ return 0;
+ }
+ else if (GET_MODE_SIZE (GET_MODE (rtl)) == DWARF2_ADDR_SIZE)
+ add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_deref, 0, 0));
+ else
+ add_loc_descr (&mem_loc_result,
+ new_loc_descr (DW_OP_deref_size,
+ GET_MODE_SIZE (GET_MODE (rtl)), 0));
+ }
else
{
rtx new_rtl = avoid_constant_pool_reference (rtl);
@@ -13219,32 +13231,72 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
goto do_scompare;
do_scompare:
- if (GET_MODE_CLASS (GET_MODE (XEXP (rtl, 0))) != MODE_INT
- || GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) > DWARF2_ADDR_SIZE
- || GET_MODE (XEXP (rtl, 0)) != GET_MODE (XEXP (rtl, 1)))
+ if (GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) > DWARF2_ADDR_SIZE
+ || GET_MODE_SIZE (GET_MODE (XEXP (rtl, 1))) > DWARF2_ADDR_SIZE)
break;
+ else
+ {
+ enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0));
- op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
- VAR_INIT_STATUS_INITIALIZED);
- op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
- VAR_INIT_STATUS_INITIALIZED);
+ if (op_mode == VOIDmode)
+ op_mode = GET_MODE (XEXP (rtl, 1));
+ if (op_mode != VOIDmode && GET_MODE_CLASS (op_mode) != MODE_INT)
+ break;
- if (op0 == 0 || op1 == 0)
- break;
+ op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
+ VAR_INIT_STATUS_INITIALIZED);
+ op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
+ VAR_INIT_STATUS_INITIALIZED);
- if (GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) < DWARF2_ADDR_SIZE)
- {
- int shift = DWARF2_ADDR_SIZE
- - GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0)));
- shift *= BITS_PER_UNIT;
- add_loc_descr (&op0, int_loc_descriptor (shift));
- add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0));
- if (CONST_INT_P (XEXP (rtl, 1)))
- op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift);
- else
+ if (op0 == 0 || op1 == 0)
+ break;
+
+ if (op_mode != VOIDmode
+ && GET_MODE_SIZE (op_mode) < DWARF2_ADDR_SIZE)
{
- add_loc_descr (&op1, int_loc_descriptor (shift));
- add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0));
+ int shift = DWARF2_ADDR_SIZE - GET_MODE_SIZE (op_mode);
+ shift *= BITS_PER_UNIT;
+ /* For eq/ne, if the operands are known to be zero-extended,
+ there is no need to do the fancy shifting up. */
+ if (op == DW_OP_eq || op == DW_OP_ne)
+ {
+ dw_loc_descr_ref last0, last1;
+ for (last0 = op0;
+ last0->dw_loc_next != NULL;
+ last0 = last0->dw_loc_next)
+ ;
+ for (last1 = op1;
+ last1->dw_loc_next != NULL;
+ last1 = last1->dw_loc_next)
+ ;
+ /* deref_size zero extends, and for constants we can check
+ whether they are zero extended or not. */
+ if (((last0->dw_loc_opc == DW_OP_deref_size
+ && last0->dw_loc_oprnd1.v.val_int
+ <= GET_MODE_SIZE (op_mode))
+ || (CONST_INT_P (XEXP (rtl, 0))
+ && (unsigned HOST_WIDE_INT) INTVAL (XEXP (rtl, 0))
+ == (INTVAL (XEXP (rtl, 0))
+ & GET_MODE_MASK (op_mode))))
+ && ((last1->dw_loc_opc == DW_OP_deref_size
+ && last1->dw_loc_oprnd1.v.val_int
+ <= GET_MODE_SIZE (op_mode))
+ || (CONST_INT_P (XEXP (rtl, 1))
+ && (unsigned HOST_WIDE_INT)
+ INTVAL (XEXP (rtl, 1))
+ == (INTVAL (XEXP (rtl, 1))
+ & GET_MODE_MASK (op_mode)))))
+ goto do_compare;
+ }
+ add_loc_descr (&op0, int_loc_descriptor (shift));
+ add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0));
+ if (CONST_INT_P (XEXP (rtl, 1)))
+ op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift);
+ else
+ {
+ add_loc_descr (&op1, int_loc_descriptor (shift));
+ add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0));
+ }
}
}
@@ -13277,42 +13329,72 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
goto do_ucompare;
do_ucompare:
- if (GET_MODE_CLASS (GET_MODE (XEXP (rtl, 0))) != MODE_INT
- || GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) > DWARF2_ADDR_SIZE
- || GET_MODE (XEXP (rtl, 0)) != GET_MODE (XEXP (rtl, 1)))
+ if (GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) > DWARF2_ADDR_SIZE
+ || GET_MODE_SIZE (GET_MODE (XEXP (rtl, 1))) > DWARF2_ADDR_SIZE)
break;
+ else
+ {
+ enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0));
- op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
- VAR_INIT_STATUS_INITIALIZED);
- op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
- VAR_INIT_STATUS_INITIALIZED);
+ if (op_mode == VOIDmode)
+ op_mode = GET_MODE (XEXP (rtl, 1));
+ if (op_mode != VOIDmode && GET_MODE_CLASS (op_mode) != MODE_INT)
+ break;
- if (op0 == 0 || op1 == 0)
- break;
+ op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
+ VAR_INIT_STATUS_INITIALIZED);
+ op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
+ VAR_INIT_STATUS_INITIALIZED);
- if (GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) < DWARF2_ADDR_SIZE)
- {
- HOST_WIDE_INT mask = GET_MODE_MASK (GET_MODE (XEXP (rtl, 0)));
- add_loc_descr (&op0, int_loc_descriptor (mask));
- add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0));
- if (CONST_INT_P (XEXP (rtl, 1)))
- op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) & mask);
- else
+ if (op0 == 0 || op1 == 0)
+ break;
+
+ if (op_mode != VOIDmode
+ && GET_MODE_SIZE (op_mode) < DWARF2_ADDR_SIZE)
{
- add_loc_descr (&op1, int_loc_descriptor (mask));
- add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0));
+ HOST_WIDE_INT mask = GET_MODE_MASK (op_mode);
+ dw_loc_descr_ref last0, last1;
+ for (last0 = op0;
+ last0->dw_loc_next != NULL;
+ last0 = last0->dw_loc_next)
+ ;
+ for (last1 = op1;
+ last1->dw_loc_next != NULL;
+ last1 = last1->dw_loc_next)
+ ;
+ if (CONST_INT_P (XEXP (rtl, 0)))
+ op0 = int_loc_descriptor (INTVAL (XEXP (rtl, 0)) & mask);
+ /* deref_size zero extends, so no need to mask it again. */
+ else if (last0->dw_loc_opc != DW_OP_deref_size
+ || last0->dw_loc_oprnd1.v.val_int
+ > GET_MODE_SIZE (op_mode))
+ {
+ add_loc_descr (&op0, int_loc_descriptor (mask));
+ add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0));
+ }
+ if (CONST_INT_P (XEXP (rtl, 1)))
+ op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) & mask);
+ /* deref_size zero extends, so no need to mask it again. */
+ else if (last1->dw_loc_opc != DW_OP_deref_size
+ || last1->dw_loc_oprnd1.v.val_int
+ > GET_MODE_SIZE (op_mode))
+ {
+ add_loc_descr (&op1, int_loc_descriptor (mask));
+ add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0));
+ }
}
- }
- else
- {
- HOST_WIDE_INT bias = 1;
- bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1);
- add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0));
- if (CONST_INT_P (XEXP (rtl, 1)))
- op1 = int_loc_descriptor ((unsigned HOST_WIDE_INT) bias
- + INTVAL (XEXP (rtl, 1)));
else
- add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, bias, 0));
+ {
+ HOST_WIDE_INT bias = 1;
+ bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1);
+ add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0));
+ if (CONST_INT_P (XEXP (rtl, 1)))
+ op1 = int_loc_descriptor ((unsigned HOST_WIDE_INT) bias
+ + INTVAL (XEXP (rtl, 1)));
+ else
+ add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst,
+ bias, 0));
+ }
}
goto do_compare;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5efa90cdcfa..b498dc4ad7b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,40 @@
+2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/32382
+ * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
+ gfc_trans_do prototype.
+ * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
+ a loop exit condition. If exit condition is given, build the loop exit
+ code, checking IO results of implied do loops in READ and WRITE.
+ (gfc_trans_do): Likewise.
+ * trans.c (trans_code): New static work function, previously
+ gfc_trans_code. Passes exit condition to gfc_trans_do.
+ (gfc_trans_code): Calls trans_code with NULL_TREE condition.
+ (gfc_trans_code_cond): Calls trans_code with loop exit condition.
+ * trans-io.c (build_dt): Build an exit condition to allow checking IO
+ result status bits in the dtparm structure. Use this condition in call
+ to gfc_trans_code_cond.
+
+2010-02-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/41113
+ PR fortran/41117
+ * trans-array.c (gfc_conv_array_parameter): Use
+ gfc_full_array_ref_p to detect full and contiguous variable
+ arrays. Full array components and contiguous arrays do not need
+ internal_pack and internal_unpack.
+
+2010-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/43030
+ * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
+
+ PR fortran/43029
+ * decl.c (enumerator_decl): Don't call gfc_free_enum_history
+ here.
+ (gfc_match_enumerator_def): But here whenever enumerator_decl returns
+ MATCH_ERROR.
+
2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
Tobias Burnus <burnus@net-b.de>
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 82c67ae0045..0f3898f7844 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -7124,10 +7124,9 @@ enumerator_decl (void)
if (initializer == NULL || initializer->ts.type != BT_INTEGER)
{
- gfc_error("ENUMERATOR %L not initialized with integer expression",
- &var_locus);
+ gfc_error ("ENUMERATOR %L not initialized with integer expression",
+ &var_locus);
m = MATCH_ERROR;
- gfc_free_enum_history ();
goto cleanup;
}
@@ -7193,7 +7192,10 @@ gfc_match_enumerator_def (void)
{
m = enumerator_decl ();
if (m == MATCH_ERROR)
- goto cleanup;
+ {
+ gfc_free_enum_history ();
+ goto cleanup;
+ }
if (m == MATCH_NO)
break;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index b525e32b166..bcc8eaeddb5 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -3958,6 +3958,7 @@ gfc_resolve_dim_arg (gfc_expr *dim)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_index_integer_kind;
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index d512da4db6b..ae39aed1c58 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -5468,17 +5468,27 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
tree tmp = NULL_TREE;
tree stmt;
tree parent = DECL_CONTEXT (current_function_decl);
- bool full_array_var, this_array_result;
+ bool full_array_var;
+ bool this_array_result;
+ bool contiguous;
gfc_symbol *sym;
stmtblock_t block;
+ gfc_ref *ref;
+
+ for (ref = expr->ref; ref; ref = ref->next)
+ if (ref->next == NULL)
+ break;
+
+ full_array_var = false;
+ contiguous = false;
+
+ if (expr->expr_type == EXPR_VARIABLE && ref)
+ full_array_var = gfc_full_array_ref_p (ref, &contiguous);
- full_array_var = (expr->expr_type == EXPR_VARIABLE
- && expr->ref->type == REF_ARRAY
- && expr->ref->u.ar.type == AR_FULL);
sym = full_array_var ? expr->symtree->n.sym : NULL;
/* The symbol should have an array specification. */
- gcc_assert (!sym || sym->as);
+ gcc_assert (!sym || sym->as || ref->u.ar.as);
if (expr->expr_type == EXPR_ARRAY && expr->ts.type == BT_CHARACTER)
{
@@ -5501,6 +5511,14 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
if (sym->ts.type == BT_CHARACTER)
se->string_length = sym->ts.u.cl->backend_decl;
+
+ if (sym->ts.type == BT_DERIVED && !sym->as)
+ {
+ gfc_conv_expr_descriptor (se, expr, ss);
+ se->expr = gfc_conv_array_data (se->expr);
+ return;
+ }
+
if (!sym->attr.pointer && sym->as->type != AS_ASSUMED_SHAPE
&& !sym->attr.allocatable)
{
@@ -5514,6 +5532,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
array_parameter_size (tmp, expr, size);
return;
}
+
if (sym->attr.allocatable)
{
if (sym->attr.dummy || sym->attr.result)
@@ -5528,6 +5547,18 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
}
}
+ if (contiguous && g77 && !this_array_result
+ && !expr->symtree->n.sym->attr.dummy)
+ {
+ gfc_conv_expr_descriptor (se, expr, ss);
+ if (expr->ts.type == BT_CHARACTER)
+ se->string_length = expr->ts.u.cl->backend_decl;
+ if (size)
+ array_parameter_size (se->expr, expr, size);
+ se->expr = gfc_conv_array_data (se->expr);
+ return;
+ }
+
if (this_array_result)
{
/* Result of the enclosing function. */
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 30561bb168e..fd8a806d7d0 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -1811,7 +1811,23 @@ build_dt (tree function, gfc_code * code)
dt_parm = var;
dt_post_end_block = &post_end_block;
- gfc_add_expr_to_block (&block, gfc_trans_code (code->block->next));
+ /* Set implied do loop exit condition. */
+ if (last_dt == READ || last_dt == WRITE)
+ {
+ gfc_st_parameter_field *p = &st_parameter_field[IOPARM_common_flags];
+
+ tmp = fold_build3 (COMPONENT_REF, st_parameter[IOPARM_ptype_common].type,
+ dt_parm, TYPE_FIELDS (TREE_TYPE (dt_parm)), NULL_TREE);
+ tmp = fold_build3 (COMPONENT_REF, TREE_TYPE (p->field),
+ tmp, p->field, NULL_TREE);
+ tmp = fold_build2 (BIT_AND_EXPR, TREE_TYPE (tmp),
+ tmp, build_int_cst (TREE_TYPE (tmp),
+ IOPARM_common_libreturn_mask));
+ }
+ else /* IOLENGTH */
+ tmp = NULL_TREE;
+
+ gfc_add_expr_to_block (&block, gfc_trans_code_cond (code->block->next, tmp));
gfc_add_block_to_block (&block, &post_iu_block);
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 84c3c85ead4..60bffdf96d6 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -831,7 +831,7 @@ gfc_trans_block_construct (gfc_code* code)
static tree
gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
- tree from, tree to, tree step)
+ tree from, tree to, tree step, tree exit_cond)
{
stmtblock_t body;
tree type;
@@ -864,7 +864,7 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
gfc_start_block (&body);
/* Main loop body. */
- tmp = gfc_trans_code (code->block->next);
+ tmp = gfc_trans_code_cond (code->block->next, exit_cond);
gfc_add_expr_to_block (&body, tmp);
/* Label for cycle statements (if needed). */
@@ -882,6 +882,15 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
"Loop variable has been modified");
}
+ /* Exit the loop if there is an I/O result condition or error. */
+ if (exit_cond)
+ {
+ tmp = build1_v (GOTO_EXPR, exit_label);
+ tmp = fold_build3 (COND_EXPR, void_type_node, exit_cond, tmp,
+ build_empty_stmt (input_location));
+ gfc_add_expr_to_block (&body, tmp);
+ }
+
/* Evaluate the loop condition. */
cond = fold_build2 (EQ_EXPR, boolean_type_node, dovar, to);
cond = gfc_evaluate_now (cond, &body);
@@ -955,7 +964,7 @@ exit_label:
because the loop count itself can overflow. */
tree
-gfc_trans_do (gfc_code * code)
+gfc_trans_do (gfc_code * code, tree exit_cond)
{
gfc_se se;
tree dovar;
@@ -1010,7 +1019,7 @@ gfc_trans_do (gfc_code * code)
if (TREE_CODE (type) == INTEGER_TYPE
&& (integer_onep (step)
|| tree_int_cst_equal (step, integer_minus_one_node)))
- return gfc_trans_simple_do (code, &block, dovar, from, to, step);
+ return gfc_trans_simple_do (code, &block, dovar, from, to, step, exit_cond);
pos_step = fold_build2 (GT_EXPR, boolean_type_node, step,
fold_convert (type, integer_zero_node));
@@ -1125,7 +1134,7 @@ gfc_trans_do (gfc_code * code)
code->block->backend_decl = tree_cons (cycle_label, exit_label, NULL);
/* Main loop body. */
- tmp = gfc_trans_code (code->block->next);
+ tmp = gfc_trans_code_cond (code->block->next, exit_cond);
gfc_add_expr_to_block (&body, tmp);
/* Label for cycle statements (if needed). */
@@ -1143,6 +1152,15 @@ gfc_trans_do (gfc_code * code)
"Loop variable has been modified");
}
+ /* Exit the loop if there is an I/O result condition or error. */
+ if (exit_cond)
+ {
+ tmp = build1_v (GOTO_EXPR, exit_label);
+ tmp = fold_build3 (COND_EXPR, void_type_node, exit_cond, tmp,
+ build_empty_stmt (input_location));
+ gfc_add_expr_to_block (&body, tmp);
+ }
+
/* Increment the loop variable. */
tmp = fold_build2 (PLUS_EXPR, type, dovar, step);
gfc_add_modify (&body, dovar, tmp);
diff --git a/gcc/fortran/trans-stmt.h b/gcc/fortran/trans-stmt.h
index e6faacd0022..46abc09a098 100644
--- a/gcc/fortran/trans-stmt.h
+++ b/gcc/fortran/trans-stmt.h
@@ -23,6 +23,9 @@ along with GCC; see the file COPYING3. If not see
Calls gfc_trans_*. */
tree gfc_trans_code (gfc_code *);
+/* Wrapper function used to pass a check condition for implied DO loops. */
+tree gfc_trans_code_cond (gfc_code *, tree);
+
/* All other gfc_trans_* should only need be called by gfc_trans_code */
/* trans-expr.c */
@@ -45,7 +48,7 @@ tree gfc_trans_return (gfc_code *);
tree gfc_trans_if (gfc_code *);
tree gfc_trans_arithmetic_if (gfc_code *);
tree gfc_trans_block_construct (gfc_code *);
-tree gfc_trans_do (gfc_code *);
+tree gfc_trans_do (gfc_code *, tree);
tree gfc_trans_do_while (gfc_code *);
tree gfc_trans_select (gfc_code *);
tree gfc_trans_forall (gfc_code *);
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index a5bb6418780..535e639faad 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1048,10 +1048,12 @@ gfc_set_backend_locus (locus * loc)
}
-/* Translate an executable statement. */
+/* Translate an executable statement. The tree cond is used by gfc_trans_do.
+ This static function is wrapped by gfc_trans_code_cond and
+ gfc_trans_code. */
-tree
-gfc_trans_code (gfc_code * code)
+static tree
+trans_code (gfc_code * code, tree cond)
{
stmtblock_t block;
tree res;
@@ -1172,7 +1174,7 @@ gfc_trans_code (gfc_code * code)
break;
case EXEC_DO:
- res = gfc_trans_do (code);
+ res = gfc_trans_do (code, cond);
break;
case EXEC_DO_WHILE:
@@ -1298,6 +1300,25 @@ gfc_trans_code (gfc_code * code)
}
+/* Translate an executable statement with condition, cond. The condition is
+ used by gfc_trans_do to test for IO result conditions inside implied
+ DO loops of READ and WRITE statements. See build_dt in trans-io.c. */
+
+tree
+gfc_trans_code_cond (gfc_code * code, tree cond)
+{
+ return trans_code (code, cond);
+}
+
+/* Translate an executable statement without condition. */
+
+tree
+gfc_trans_code (gfc_code * code)
+{
+ return trans_code (code, NULL_TREE);
+}
+
+
/* This function is called after a complete program unit has been parsed
and resolved. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 2e219d614e9..31e4ab37513 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4575,20 +4575,35 @@ process_command (int argc, const char **argv)
}
else
{
- const char *p = strchr (argv[i], '@');
+ const char *p = strrchr (argv[i], '@');
char *fname;
+ long offset;
+ int consumed;
#ifdef HAVE_TARGET_OBJECT_SUFFIX
argv[i] = convert_filename (argv[i], 0, access (argv[i], F_OK));
#endif
- if (!p)
- fname = xstrdup (argv[i]);
- else
- {
+ /* For LTO static archive support we handle input file
+ specifications that are composed of a filename and
+ an offset like FNAME@OFFSET. */
+ if (p
+ && p != argv[i]
+ && sscanf (p, "@%li%n", &offset, &consumed) >= 1
+ && strlen (p) == (unsigned int)consumed)
+ {
fname = (char *)xmalloc (p - argv[i] + 1);
memcpy (fname, argv[i], p - argv[i]);
fname[p - argv[i]] = '\0';
- }
-
+ /* Only accept non-stdin and existing FNAME parts, otherwise
+ try with the full name. */
+ if (strcmp (fname, "-") == 0 || access (fname, F_OK) < 0)
+ {
+ free (fname);
+ fname = xstrdup (argv[i]);
+ }
+ }
+ else
+ fname = xstrdup (argv[i]);
+
if (strcmp (fname, "-") != 0 && access (fname, F_OK) < 0)
{
perror_with_name (fname);
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index cc48859b37e..424f5c68169 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -1428,7 +1428,7 @@ create_params_index (htab_t index_table, CloogProgram *prog) {
*/
bool
-gloog (scop_p scop, htab_t bb_pbb_mapping)
+gloog (scop_p scop, VEC (scop_p, heap) *scops, htab_t bb_pbb_mapping)
{
VEC (tree, heap) *newivs = VEC_alloc (tree, heap, 10);
loop_p context_loop;
@@ -1436,6 +1436,7 @@ gloog (scop_p scop, htab_t bb_pbb_mapping)
ifsese if_region = NULL;
htab_t rename_map, newivs_index, params_index;
cloog_prog_clast pc;
+ int i;
timevar_push (TV_GRAPHITE_CODE_GEN);
gloog_error = false;
@@ -1481,6 +1482,10 @@ gloog (scop_p scop, htab_t bb_pbb_mapping)
if_region->true_region->exit);
scev_reset_htab ();
rename_nb_iterations (rename_map);
+
+ for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
+ rename_sese_parameters (rename_map, SCOP_REGION (scop));
+
recompute_all_dominators ();
graphite_verify ();
diff --git a/gcc/graphite-clast-to-gimple.h b/gcc/graphite-clast-to-gimple.h
index 85fb5e1f34d..ae1f35c7962 100644
--- a/gcc/graphite-clast-to-gimple.h
+++ b/gcc/graphite-clast-to-gimple.h
@@ -36,7 +36,7 @@ typedef struct bb_pbb_def
poly_bb_p pbb;
}bb_pbb_def;
-extern bool gloog (scop_p, htab_t);
+extern bool gloog (scop_p, VEC (scop_p, heap) *, htab_t);
extern cloog_prog_clast scop_to_clast (scop_p);
extern void debug_clast_stmt (struct clast_stmt *);
extern void print_clast_stmt (FILE *, struct clast_stmt *);
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 6ed6a846b38..3e29b4bd4da 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -464,6 +464,8 @@ new_scop (void *region)
SCOP_ORIGINAL_SCHEDULE (scop) = NULL;
SCOP_TRANSFORMED_SCHEDULE (scop) = NULL;
SCOP_SAVED_SCHEDULE (scop) = NULL;
+ POLY_SCOP_P (scop) = false;
+
return scop;
}
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index a2969c77216..0a8204ec9a1 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -277,8 +277,10 @@ struct poly_scattering
struct poly_bb
{
+ /* Pointer to a basic block or a statement in the compiler. */
void *black_box;
+ /* Pointer to the SCOP containing this PBB. */
scop_p scop;
/* The iteration domain of this bb.
@@ -1303,6 +1305,10 @@ struct scop
/* A hashtable of the data dependence relations for the original
scattering. */
htab_t original_pddrs;
+
+ /* True when the scop has been converted to its polyhedral
+ representation. */
+ bool poly_scop_p;
};
#define SCOP_BBS(S) (S->bbs)
@@ -1312,6 +1318,7 @@ struct scop
#define SCOP_ORIGINAL_SCHEDULE(S) (S->original_schedule)
#define SCOP_TRANSFORMED_SCHEDULE(S) (S->transformed_schedule)
#define SCOP_SAVED_SCHEDULE(S) (S->saved_schedule)
+#define POLY_SCOP_P(S) (S->poly_scop_p)
extern scop_p new_scop (void *);
extern void free_scop (scop_p);
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index ddd1121a58d..d89f0f81537 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -225,6 +225,7 @@ graphite_can_represent_scev (tree scev, int outermost_loop)
&& !CONVERT_EXPR_CODE_P (TREE_CODE (TREE_OPERAND (scev, 1)))
&& !(chrec_contains_symbols (TREE_OPERAND (scev, 0))
&& chrec_contains_symbols (TREE_OPERAND (scev, 1)))
+ && graphite_can_represent_init (scev)
&& graphite_can_represent_scev (TREE_OPERAND (scev, 0), outermost_loop)
&& graphite_can_represent_scev (TREE_OPERAND (scev, 1), outermost_loop);
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 3be2d860391..d4889b044d6 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2719,6 +2719,41 @@ insert_copyin (tree red, gimple loop_phi)
gsi_insert_seq_on_edge (edge_initial_value_for_loop_phi (loop_phi), stmts);
}
+/* Removes the PHI node and resets all the debug stmts that are using
+ the PHI_RESULT. */
+
+static void
+remove_phi (gimple phi)
+{
+ imm_use_iterator imm_iter;
+ tree def;
+ use_operand_p use_p;
+ gimple_stmt_iterator gsi;
+ VEC (gimple, heap) *update = VEC_alloc (gimple, heap, 3);
+ unsigned int i;
+ gimple stmt;
+
+ def = PHI_RESULT (phi);
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def)
+ {
+ stmt = USE_STMT (use_p);
+
+ if (is_gimple_debug (stmt))
+ {
+ gimple_debug_bind_reset_value (stmt);
+ VEC_safe_push (gimple, heap, update, stmt);
+ }
+ }
+
+ for (i = 0; VEC_iterate (gimple, update, i, stmt); i++)
+ update_stmt (stmt);
+
+ VEC_free (gimple, heap, update);
+
+ gsi = gsi_for_phi_node (phi);
+ remove_phi_node (&gsi, false);
+}
+
/* Rewrite out of SSA the reduction described by the loop phi nodes
IN, and the close phi nodes OUT. IN and OUT are structured by loop
levels like this:
@@ -2737,7 +2772,6 @@ translate_scalar_reduction_to_array (VEC (gimple, heap) *in,
unsigned int i;
gimple loop_phi;
tree red;
- gimple_stmt_iterator gsi;
for (i = 0; VEC_iterate (gimple, in, i, loop_phi); i++)
{
@@ -2764,11 +2798,8 @@ translate_scalar_reduction_to_array (VEC (gimple, heap) *in,
insert_copyin (red, loop_phi);
}
- gsi = gsi_for_phi_node (loop_phi);
- remove_phi_node (&gsi, false);
-
- gsi = gsi_for_phi_node (close_phi);
- remove_phi_node (&gsi, false);
+ remove_phi (loop_phi);
+ remove_phi (close_phi);
}
}
@@ -2898,6 +2929,7 @@ build_poly_scop (scop_p scop)
scop_to_lst (scop);
build_scop_scattering (scop);
build_scop_drs (scop);
+ POLY_SCOP_P (scop) = true;
return true;
}
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 7037a3fa1a0..ba05cc74361 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -268,20 +268,13 @@ graphite_transform_loops (void)
bb_pbb_mapping = htab_create (10, bb_pbb_map_hash, eq_bb_pbb_map, free);
for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
- {
- bool transform_done = false;
-
- if (!build_poly_scop (scop))
- continue;
+ build_poly_scop (scop);
- if (apply_poly_transforms (scop))
- transform_done = gloog (scop, bb_pbb_mapping);
- else
- check_poly_representation (scop);
-
- if (transform_done)
- need_cfg_cleanup_p = true;
- }
+ for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
+ if (POLY_SCOP_P (scop)
+ && apply_poly_transforms (scop)
+ && gloog (scop, scops, bb_pbb_mapping))
+ need_cfg_cleanup_p = true;
htab_delete (bb_pbb_mapping);
free_scops (scops);
diff --git a/gcc/intl.c b/gcc/intl.c
index 63de3ec4d83..47e0b3da051 100644
--- a/gcc/intl.c
+++ b/gcc/intl.c
@@ -121,6 +121,19 @@ gcc_gettext_width (const char *msgstr)
#endif /* ENABLE_NLS */
+#ifndef ENABLE_NLS
+
+const char *
+fake_ngettext (const char *singular, const char *plural, unsigned long n)
+{
+ if (n == 1UL)
+ return singular;
+
+ return plural;
+}
+
+#endif
+
/* Return the indent for successive lines, using the width of
the STR. STR must have been translated already. The string
must be freed by the caller. */
diff --git a/gcc/intl.h b/gcc/intl.h
index 2df9b178c00..61a9434a5cd 100644
--- a/gcc/intl.h
+++ b/gcc/intl.h
@@ -38,8 +38,13 @@ extern size_t gcc_gettext_width (const char *);
# define bindtextdomain(domain, directory) (domain)
# undef gettext
# define gettext(msgid) (msgid)
+# define ngettext(singular,plural,n) fake_ngettext(singular,plural,n)
# define gcc_init_libintl() /* nothing */
# define gcc_gettext_width(s) strlen(s)
+
+extern const char *fake_ngettext(const char *singular,const char *plural,
+ unsigned long int n);
+
#endif
#ifndef _
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index a726d32f5bb..58e51231bf1 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-11 Richard Guenther <rguenther@suse.de>
+
+ PR driver/43021
+ * lto-elf.c (lto_elf_file_open): Handle file@offset case more
+ appropriately.
+
2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
* lto.c (O_BINARY): Define.
diff --git a/gcc/lto/lto-elf.c b/gcc/lto/lto-elf.c
index b70648d4680..356e5139536 100644
--- a/gcc/lto/lto-elf.c
+++ b/gcc/lto/lto-elf.c
@@ -550,35 +550,33 @@ lto_elf_file_open (const char *filename, bool writable)
lto_elf_file *elf_file;
lto_file *result = NULL;
off_t offset;
+ long loffset;
off_t header_offset;
const char *offset_p;
char *fname;
+ int consumed;
- offset_p = strchr (filename, '@');
- if (!offset_p)
+ offset_p = strrchr (filename, '@');
+ if (offset_p
+ && offset_p != filename
+ && sscanf (offset_p, "@%li%n", &loffset, &consumed) >= 1
+ && strlen (offset_p) == (unsigned int)consumed)
{
- fname = xstrdup (filename);
- offset = 0;
- header_offset = 0;
- }
- else
- {
- /* The file started with '@' is a file containing command line
- options. Stop if it doesn't exist. */
- if (offset_p == filename)
- fatal_error ("command line option file '%s' does not exist",
- filename);
-
fname = (char *) xmalloc (offset_p - filename + 1);
memcpy (fname, filename, offset_p - filename);
fname[offset_p - filename] = '\0';
- offset_p += 3; /* skip the @0x */
- offset = lto_parse_hex (offset_p);
+ offset = (off_t)loffset;
/* elf_rand expects the offset to point to the ar header, not the
object itself. Subtract the size of the ar header (60 bytes).
We don't uses sizeof (struct ar_hd) to avoid including ar.h */
header_offset = offset - 60;
}
+ else
+ {
+ fname = xstrdup (filename);
+ offset = 0;
+ header_offset = 0;
+ }
/* Set up. */
elf_file = XCNEW (lto_elf_file);
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 5bacec3e40c..de6afc797b1 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sv.po: Update.
+
2010-02-07 Joseph Myers <joseph@codesourcery.com>
* sv.po: Update.
diff --git a/gcc/po/sv.po b/gcc/po/sv.po
index ae20c59e744..068f2932e9c 100644
--- a/gcc/po/sv.po
+++ b/gcc/po/sv.po
@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: gcc 4.5-b20100204\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2010-02-04 16:20+0000\n"
-"PO-Revision-Date: 2010-02-07 19:39+0100\n"
+"PO-Revision-Date: 2010-02-14 17:26+0100\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
@@ -5169,9 +5169,8 @@ msgid "Warn about calls with implicit interface"
msgstr "Varna för anrop med implicit gränssnitt"
#: fortran/lang.opt:101
-#, fuzzy
msgid "Warn about called procedures not explicitly declared"
-msgstr "Varna för anrop med implicit gränssnitt"
+msgstr "Varna för anrop av procedurer som inte explicit deklarerats"
#: fortran/lang.opt:105
msgid "Warn about truncated source lines"
@@ -5226,9 +5225,8 @@ msgid "Produce a backtrace when a runtime error is encountered"
msgstr "Skapa en stackspårning när ett fel inträffar under körning"
#: fortran/lang.opt:169
-#, fuzzy
msgid "-fblas-matmul-limit=<n>\tSize of the smallest matrix for which matmul will use BLAS"
-msgstr "-fblas-matmul-limit=<n> Storlek på den minsta matris för vilken matmul kommer använda BLAS"
+msgstr "-fblas-matmul-limit=<n>\tStorlek på den minsta matris för vilken matmul kommer använda BLAS"
#: fortran/lang.opt:173
msgid "Produce a warning at runtime if a array temporary has been created for a procedure argument"
@@ -5307,14 +5305,12 @@ msgid "Allow arbitrary character line width in fixed mode"
msgstr "Tillåt radlängd med godtyckligt antal tecken i fast läge"
#: fortran/lang.opt:249
-#, fuzzy
msgid "-ffixed-line-length-<n>\t\tUse n as character line width in fixed mode"
-msgstr "Använd radlängd med n tecken i fast läge"
+msgstr "-ffixed-line-length-<n>\t\tAnvänd radlängd med n tecken i fast läge"
#: fortran/lang.opt:253
-#, fuzzy
msgid "-ffpe-trap=[...]\tStop on following floating point exceptions"
-msgstr "Stanna vid följande flyttalsundantag"
+msgstr "-ffpe-trap=[...]\tStanna vid följande flyttalsundantag"
#: fortran/lang.opt:257
msgid "Assume that the source file is free form"
@@ -5325,62 +5321,52 @@ msgid "Allow arbitrary character line width in free mode"
msgstr "Tillåt radlängd med godtyckligt antal tecken i fri form"
#: fortran/lang.opt:265
-#, fuzzy
msgid "-ffree-line-length-<n>\t\tUse n as character line width in free mode"
-msgstr "Använd radlängd med n tecken i fri form"
+msgstr "-ffree-line-length-<n>\t\tAnvänd radlängd med n tecken i fri form"
#: fortran/lang.opt:269
msgid "Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements"
msgstr "Ange att ingen implicit typning är tillåten, om inte åsidosatt med uttryckliga IMPLICIT-satser"
#: fortran/lang.opt:273
-#, fuzzy
msgid "-finit-character=<n>\tInitialize local character variables to ASCII value n"
-msgstr "-finit-character=<n> Initiera lokala teckenvariabler med ASCII-värde n"
+msgstr "-finit-character=<n>\tInitiera lokala teckenvariabler med ASCII-värde n"
#: fortran/lang.opt:277
-#, fuzzy
msgid "-finit-integer=<n>\tInitialize local integer variables to n"
-msgstr "-finit-integer=<n> Initiera lokala heltalsvariabler med n"
+msgstr "-finit-integer=<n>\tInitiera lokala heltalsvariabler med n"
#: fortran/lang.opt:281
msgid "Initialize local variables to zero (from g77)"
msgstr "Initiera lokala variabler med noll (från g77)"
#: fortran/lang.opt:285
-#, fuzzy
msgid "-finit-logical=<true|false>\tInitialize local logical variables"
-msgstr "-finit-logical=<true|false> Initiera lokala logiska variabler"
+msgstr "-finit-logical=<true|false>\tInitiera lokala logiska variabler"
#: fortran/lang.opt:289
-#, fuzzy
msgid "-finit-real=<zero|nan|inf|-inf>\tInitialize local real variables"
-msgstr "-finit-real=<zero|nan|inf|-inf> Initiera lokala reella variabler"
+msgstr "-finit-real=<zero|nan|inf|-inf>\tInitiera lokala reella variabler"
#: fortran/lang.opt:293
-#, fuzzy
msgid "-fmax-array-constructor=<n>\tMaximum number of objects in an array constructor"
-msgstr "-fmax-array-constructor=<n> Maximalt antal objekt i en vektorkonstruerare"
+msgstr "-fmax-array-constructor=<n>\tMaximalt antal objekt i en vektorkonstruerare"
#: fortran/lang.opt:297
-#, fuzzy
msgid "-fmax-errors=<n>\tMaximum number of errors to report"
-msgstr "Det maximala antalet fel som skall rapporteras"
+msgstr "-fmax-errors=<n>\tMaximalt antal fel som skall rapporteras"
#: fortran/lang.opt:301
-#, fuzzy
msgid "-fmax-identifier-length=<n>\tMaximum identifier length"
-msgstr "Maximal identifierarlängd"
+msgstr "-fmax-identifier-length=<n>\tMaximal identifierarlängd"
#: fortran/lang.opt:305
-#, fuzzy
msgid "-fmax-subrecord-length=<n>\tMaximum length for subrecords"
-msgstr "Maximal längd för underposter"
+msgstr "-fmax-subrecord-length=<n>\tMaximal längd för underposter"
#: fortran/lang.opt:309
-#, fuzzy
msgid "-fmax-stack-var-size=<n>\tSize in bytes of the largest array that will be put on the stack"
-msgstr "Storlek i byte på den största vektorn som läggs på stacken"
+msgstr "-fmax-stack-var-size=<n>\tStorlek i byte på den största vektorn som läggs på stacken"
#: fortran/lang.opt:313
msgid "Set default accessibility of module entities to PRIVATE."
@@ -5411,9 +5397,8 @@ msgid "Copy array sections into a contiguous block on procedure entry"
msgstr "Kopiera vektorsektioner till sammanhängande block vid procedurstart"
#: fortran/lang.opt:349
-#, fuzzy
msgid "-fcheck=[...]\tSpecify which runtime checks are to be performed"
-msgstr "Ange vilka körtidskontroller som skall utföras"
+msgstr "-fcheck=[...]\tAnge vilka körtidskontroller som skall utföras"
#: fortran/lang.opt:353
msgid "Append a second underscore if the name already contains an underscore"
@@ -6006,34 +5991,28 @@ msgid "SYMBOL_VECTOR=(__divdi3=PROCEDURE)"
msgstr "SYMBOL_VECTOR=(__divdi3=PROCEDURE)"
#: config/m32c/m32c.opt:24
-#, fuzzy
msgid "-msim\tUse simulator runtime"
-msgstr "Använd simulatorkörtider"
+msgstr "-msim\tAnvänd simulatorkörtider"
#: config/m32c/m32c.opt:28
-#, fuzzy
msgid "-mcpu=r8c\tCompile code for R8C variants"
-msgstr "Kompilera kod för R8C-varianter"
+msgstr "-mcpu=r8c\tKompilera kod för R8C-varianter"
#: config/m32c/m32c.opt:32
-#, fuzzy
msgid "-mcpu=m16c\tCompile code for M16C variants"
-msgstr "Kompilera kod för M16C-varianter"
+msgstr "-mcpu=m16c\tKompilera kod för M16C-varianter"
#: config/m32c/m32c.opt:36
-#, fuzzy
msgid "-mcpu=m32cm\tCompile code for M32CM variants"
-msgstr "Kompilera kod för M32CM-varianter"
+msgstr "-mcpu=m32cm\tKompilera kod för M32CM-varianter"
#: config/m32c/m32c.opt:40
-#, fuzzy
msgid "-mcpu=m32c\tCompile code for M32C variants"
-msgstr "Kompilera kod för för M32C-varianter"
+msgstr "-mcpu=m32c\tKompilera kod för för M32C-varianter"
#: config/m32c/m32c.opt:44
-#, fuzzy
msgid "-memregs=\tNumber of memreg bytes (default: 16, range: 0..16)"
-msgstr "Antal memreg-byte (standard: 16, intervall: 0..16)"
+msgstr "-memregs=\tAntal memreg-byte (standard: 16, intervall: 0..16)"
#: config/sparc/little-endian.opt:23
msgid "Generate code for little-endian"
@@ -6839,18 +6818,16 @@ msgid "Generate VRSAVE instructions when generating AltiVec code"
msgstr "Generera VRSAVE-instruktioner när AltiVec-kod genereras"
#: config/rs6000/rs6000.opt:238
-#, fuzzy
msgid "-mvrsave=yes/no\tDeprecated option. Use -mvrsave/-mno-vrsave instead"
-msgstr "Undanbedd flagga. Använd -mvrsave/-mno-vrsave istället"
+msgstr "-mvrsave=yes/no\tUndanbedd flagga. Använd -mvrsave/-mno-vrsave istället"
#: config/rs6000/rs6000.opt:242
msgid "Generate isel instructions"
msgstr "Generera isel-instruktioner"
#: config/rs6000/rs6000.opt:246
-#, fuzzy
msgid "-misel=yes/no\tDeprecated option. Use -misel/-mno-isel instead"
-msgstr "Undanbedd flagga. Använd -misel/-mno-isel istället"
+msgstr "-misel=yes/no\tUndanbedd flagga. Använd -misel/-mno-isel istället"
#: config/rs6000/rs6000.opt:250
msgid "Generate SPE SIMD instructions on E500"
@@ -6861,34 +6838,28 @@ msgid "Generate PPC750CL paired-single instructions"
msgstr "Generera PPC750CL:s par-singel-instruktioner"
#: config/rs6000/rs6000.opt:258
-#, fuzzy
msgid "-mspe=yes/no\tDeprecated option. Use -mspe/-mno-spe instead"
-msgstr "Undanbedd flagga. Använd -mspe/-mno-spe istället"
+msgstr "-mspe=yes/no\tUndanbedd flagga. Använd -mspe/-mno-spe istället"
#: config/rs6000/rs6000.opt:262
-#, fuzzy
msgid "-mdebug=\tEnable debug output"
-msgstr "Aktivera felsökningsutdata"
+msgstr "-mdebug=\tAktivera felsökningsutdata"
#: config/rs6000/rs6000.opt:266
-#, fuzzy
msgid "-mabi=\tSpecify ABI to use"
-msgstr "Ange ABI att använda"
+msgstr "-mabi=\tAnge ABI att använda"
#: config/rs6000/rs6000.opt:270
-#, fuzzy
msgid "-mcpu=\tUse features of and schedule code for given CPU"
-msgstr "Använd funktioner i och schemalägg kod för angiven CPU"
+msgstr "-mcpu=\tAnvänd funktioner i och schemalägg kod för angiven CPU"
#: config/rs6000/rs6000.opt:274
-#, fuzzy
msgid "-mtune=\tSchedule code for given CPU"
-msgstr "Schemalägg kod för en given CPU"
+msgstr "-mtune=\tSchemalägg kod för en given CPU"
#: config/rs6000/rs6000.opt:278
-#, fuzzy
msgid "-mtraceback=\tSelect full, part, or no traceback table"
-msgstr "Välj fullständig, partiell, eller ingen bakåtspårningstabell"
+msgstr "-mtraceback=\tVälj fullständig, partiell, eller ingen bakåtspårningstabell"
#: config/rs6000/rs6000.opt:282
msgid "Avoid all range limits on call instructions"
@@ -6907,14 +6878,12 @@ msgid "Warn about deprecated 'vector long ...' AltiVec type usage"
msgstr "Varna för användning av AltiVec-typen \"vector long ...\" som bör undvikas"
#: config/rs6000/rs6000.opt:298
-#, fuzzy
msgid "-mfloat-gprs=\tSelect GPR floating point method"
-msgstr "Välj flyttalsmetoden GPR"
+msgstr "-mfloat-gprs=\tVälj GPR-flyttalsmetod"
#: config/rs6000/rs6000.opt:302
-#, fuzzy
msgid "-mlong-double-<n>\tSpecify size of long double (64 or 128 bits)"
-msgstr "Ange storlek på long double (64 eller 128 bitar)"
+msgstr "-mlong-double-<n>\tAnge storlek på long double (64 eller 128 bitar)"
#: config/rs6000/rs6000.opt:306
msgid "Determine which dependences between insns are considered costly"
@@ -6945,9 +6914,8 @@ msgid "Floating point unit does not support divide & sqrt"
msgstr "Flyttalsenheten stödjer inte division & kvadratrot"
#: config/rs6000/rs6000.opt:334
-#, fuzzy
msgid "-mfpu=\tSpecify FP (sp, dp, sp-lite, dp-lite) (implies -mxilinx-fpu)"
-msgstr "Ange FP (sp, dp, sp-lite, dp-lite) (implicerar -mxilinx-fpu)"
+msgstr "-mfpu=\tAnge FP (sp, dp, sp-lite, dp-lite) (implicerar -mxilinx-fpu)"
#: config/rs6000/rs6000.opt:338
msgid "Specify Xilinx FPU."
@@ -7176,24 +7144,20 @@ msgid "Prepend the name of the cpu to all public symbol names"
msgstr "Skjut in namnet på cpu:n före alla publika symbolnamn"
#: config/arc/arc.opt:42
-#, fuzzy
msgid "-mcpu=CPU\tCompile code for ARC variant CPU"
-msgstr "Kompilera kod för ARC-variant av CPU"
+msgstr "-mcpu=CPU\tKompilera kod för ARC-variant CPU"
#: config/arc/arc.opt:46
-#, fuzzy
msgid "-mtext=SECTION\tPut functions in SECTION"
-msgstr "Lägg funktioner i SECTION"
+msgstr "-mtext=SEKTION\tLägg funktioner i SEKTION"
#: config/arc/arc.opt:50
-#, fuzzy
msgid "-mdata=SECTION\tPut data in SECTION"
-msgstr "Lägg data i SECTION"
+msgstr "-mdata=SEKTION\tLägg data i SEKTION"
#: config/arc/arc.opt:54
-#, fuzzy
msgid "-mrodata=SECTION\tPut read-only data in SECTION"
-msgstr "Lägg endast läsbara data i SECTION"
+msgstr "-mrodata=SEKTION\tLägg endast läsbara data i SEKTION"
#: config/sh/sh.opt:44
msgid "Generate SH1 code"
@@ -7684,9 +7648,8 @@ msgid "Use subroutines for function prologues and epilogues"
msgstr "Använd subrutiner för funktionprologer och -epiloger"
#: config/avr/avr.opt:27
-#, fuzzy
msgid "-mmcu=MCU\tSelect the target MCU"
-msgstr "Välj mål-MCU:n"
+msgstr "-mmcu=MCU\tVälj mål-MCU:n"
#: config/avr/avr.opt:34
msgid "Use an 8-bit 'int' type"
@@ -7830,18 +7793,16 @@ msgid "Intersperse literal pools with code in the text section"
msgstr "Växla mellan bokstavliga pooler och kod i textsektionen"
#: config/xtensa/xtensa.opt:43
-#, fuzzy
msgid "-mno-serialize-volatile\tDo not serialize volatile memory references with MEMW instructions"
-msgstr "Serialisera inte minnesreferenser till flyktigt minne med MEMW-instruktioner"
+msgstr "-mno-serialize-volatile\tSerialisera inte minnesreferenser till flyktigt minne med MEMW-instruktioner"
#: config/stormy16/stormy16.opt:24
msgid "Provide libraries for the simulator"
msgstr "Tillhandahåll bibliotek för simulatorn"
#: config/mips/mips.opt:23
-#, fuzzy
msgid "-mabi=ABI\tGenerate code that conforms to the given ABI"
-msgstr "Generera kod som följer det angivna ABI:et"
+msgstr "-mabi=ABI\tGenerera kod som följer det angivna ABI:et"
#: config/mips/mips.opt:27
msgid "Generate code that can be used in SVR4-style dynamic objects"
@@ -7852,14 +7813,12 @@ msgid "Use PMC-style 'mad' instructions"
msgstr "Använd \"mad\"-instruktioner i PMC-stil"
#: config/mips/mips.opt:35
-#, fuzzy
msgid "-march=ISA\tGenerate code for the given ISA"
-msgstr "Generera kod för den angivna ISA:n"
+msgstr "-march=ISA\tGenerera kod för den angivna ISA:n"
#: config/mips/mips.opt:39
-#, fuzzy
msgid "-mbranch-cost=COST\tSet the cost of branches to roughly COST instructions"
-msgstr "Ange kostnaden för grenar till ungefär COST instruktioner"
+msgstr "-mbranch-cost=KOSTNAD\tAnge kostnaden för grenar till ungefär KOSTNAD instruktioner"
#: config/mips/mips.opt:43
msgid "Use Branch Likely instructions, overriding the architecture default"
@@ -7874,9 +7833,8 @@ msgid "Trap on integer divide by zero"
msgstr "Fånga heltalsdivision med noll"
#: config/mips/mips.opt:55
-#, fuzzy
msgid "-mcode-readable=SETTING\tSpecify when instructions are allowed to access code"
-msgstr "Ange när instruktioner tillåts komma åt kod"
+msgstr "-code-readable=INSTÄLLNING\tAnge när instruktioner tillåts komma åt kod"
#: config/mips/mips.opt:59
msgid "Use branch-and-break sequences to check for integer divide by zero"
@@ -7963,9 +7921,8 @@ msgid "Use 64-bit floating-point registers"
msgstr "Använd 64-bitars flyttalsregister"
#: config/mips/mips.opt:149
-#, fuzzy
msgid "-mflush-func=FUNC\tUse FUNC to flush the cache before calling stack trampolines"
-msgstr "Använd FUNC för att tömma cachen föra anrop av stacktrampoliner"
+msgstr "-mflush-func=FUNK\tAnvänd FUNK för att tömma cachen föra anrop av stacktrampoliner"
#: config/mips/mips.opt:153
msgid "Generate floating-point multiply-add instructions"
@@ -7996,9 +7953,8 @@ msgid "Generate code that can be safely linked with MIPS16 code."
msgstr "Generera kod som kan länkas säkert med MIPS16-kod."
#: config/mips/mips.opt:181
-#, fuzzy
msgid "-mipsN\tGenerate code for ISA level N"
-msgstr "Generera kod för ISA nivå N"
+msgstr "-mipsN\tGenerera kod för ISA nivå N"
#: config/mips/mips.opt:185
msgid "Generate MIPS16 code"
@@ -8065,9 +8021,8 @@ msgid "Use paired-single floating-point instructions"
msgstr "Använd parvisa enkla flyttalsinstruktioner"
#: config/mips/mips.opt:249
-#, fuzzy
msgid "-mr10k-cache-barrier=SETTING\tSpecify when r10k cache barriers should be inserted"
-msgstr "Ange när r10k-cache-barriärer skall skjutas in"
+msgstr "-mr10k-cache-barrier=INSTÄLLNING\tAnge när r10k-cache-barriärer skall skjutas in"
#: config/mips/mips.opt:253
msgid "Try to allow the linker to turn PIC calls into direct calls"
@@ -8102,9 +8057,8 @@ msgid "Use synci instruction to invalidate i-cache"
msgstr "Använd synci-instruktioner för att invalidera i-cachen"
#: config/mips/mips.opt:285
-#, fuzzy
msgid "-mtune=PROCESSOR\tOptimize the output for PROCESSOR"
-msgstr "Optimera utmatning för PROCESSOR"
+msgstr "-mtune=PROCESSOR\tOptimera utmatningen för PROCESSOR"
#: config/mips/mips.opt:289 config/iq2000/iq2000.opt:44
msgid "Put uninitialized constants in ROM (needs -membedded-data)"
@@ -8271,19 +8225,16 @@ msgid "Override -mbest-lib-options"
msgstr "Åsidosätt -mbest-lib-options"
#: config/cris/cris.opt:165
-#, fuzzy
msgid "-march=ARCH\tGenerate code for the specified chip or CPU version"
-msgstr "Generera kod för det angivna chip:et eller CPU-versionen"
+msgstr "-march=ARK\tGenerera kod för det angivna chip:et eller CPU-versionen"
#: config/cris/cris.opt:169
-#, fuzzy
msgid "-mtune=ARCH\tTune alignment for the specified chip or CPU version"
-msgstr "Trimma justering för det angivna chip:et eller CPU-versionen"
+msgstr "-mtune=ARK\tTrimma justering för det angivna chip:et eller CPU-versionen"
#: config/cris/cris.opt:173
-#, fuzzy
msgid "-mmax-stackframe=SIZE\tWarn when a stackframe is larger than the specified size"
-msgstr "Varna när en stackram är större än den angivna storleken"
+msgstr "-mmax-stackframe=STORLEK\tVarna när en stackram är större än den angivna storleken"
#: config/h8300/h8300.opt:23
msgid "Generate H8S code"
@@ -8592,9 +8543,8 @@ msgid "Generate code for the kernel or loadable kernel extensions"
msgstr "Generera kod för kärnan eller laddbara kärnutvidgningar"
#: config/darwin.opt:47
-#, fuzzy
msgid "-iframework <dir>\tAdd <dir> to the end of the system framework include path"
-msgstr "Lägg till <dir> till slutet av systemramverkets inkluderingssökväg"
+msgstr "-iframework <kat>\tLägg till <kat> till slutet av systemramverkets inkluderingssökväg"
#: config/lynx.opt:23
msgid "Support legacy multi-threading"
@@ -8769,24 +8719,20 @@ msgid "Set name of main routine for the debugger"
msgstr "Ange namnet på huvudrutinen för felsökaren"
#: config/rx/rx.opt:26
-#, fuzzy
msgid "Store doubles in 64 bits."
-msgstr "Lagrar dubbla i 32 bitar."
+msgstr "Lagrar dubbla i 64 bitar."
#: config/rx/rx.opt:30
-#, fuzzy
msgid "Stores doubles in 32 bits. This is the default."
-msgstr "Lagrar dubbla i 64 bitar. Detta är standard."
+msgstr "Lagrar dubbla i 32 bitar. Detta är standard."
#: config/rx/rx.opt:34
-#, fuzzy
msgid "Disable the use of RX FPU instructions. "
-msgstr "Tillåt inte användningen av RX FPU-instruktionerna."
+msgstr "Tillåt inte användningen av RX FPU-instruktionerna. "
#: config/rx/rx.opt:41
-#, fuzzy
msgid "Enable the use of RX FPU instructions. This is the default."
-msgstr "Möjliggör användning av RX FPU-instruktionerna."
+msgstr "Möjliggör användning av RX FPU-instruktionerna. Detta är standard."
#: config/rx/rx.opt:47
msgid "Specify the target RX cpu type."
@@ -8853,9 +8799,8 @@ msgid "Enable user-defined instructions"
msgstr "Använd användardefinierade instruktioner"
#: c.opt:42
-#, fuzzy
msgid "-A<question>=<answer>\tAssert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>"
-msgstr "Intyga <svar> på <fråga>. Om \"-\" sätts före <fråga> avaktiveras <svar>et till <fråga>n"
+msgstr "-A<fråga>=<svar>\tIntyga <svar> på <fråga>. Om \"-\" sätts före <fråga> avaktiveras <svar>:et till <fråga>:n"
#: c.opt:46
msgid "Do not discard comments"
@@ -8866,23 +8811,20 @@ msgid "Do not discard comments in macro expansions"
msgstr "Släng inte kommentarer vid makroexpansioner"
#: c.opt:54
-#, fuzzy
msgid "-D<macro>[=<val>]\tDefine a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1"
-msgstr "Definiera ett <makro> med <värde> som sitt värde. Om bara <makro> anges sätts <värde> till 1"
+msgstr "-D<makro>[=<värde>]\tDefiniera ett <makro> med <värde> som sitt värde. Om bara <makro> anges sätts <värde> till 1"
#: c.opt:61
-#, fuzzy
msgid "-F <dir>\tAdd <dir> to the end of the main framework include path"
-msgstr "Lägg till <kat> till slutet av huvudramverkets inkluderingssökväg"
+msgstr "-F <kat>\tLägg till <kat> till slutet av huvudramverkets inkluderingssökväg"
#: c.opt:65
msgid "Print the name of header files as they are used"
msgstr "Skriv ut namnet på huvudfiler allteftersom de används"
#: c.opt:69
-#, fuzzy
msgid "-I <dir>\tAdd <dir> to the end of the main include path"
-msgstr "Lägg till <kat> till slutet av huvudsökvägen"
+msgstr "-I <kat>\tLägg till <kat> till slutet av huvudsökvägen"
#: c.opt:73
msgid "Generate make dependencies"
@@ -8893,9 +8835,8 @@ msgid "Generate make dependencies and compile"
msgstr "Generera make-beroenden och kompilera"
#: c.opt:81
-#, fuzzy
msgid "-MF <file>\tWrite dependency output to the given file"
-msgstr "Skriv beroendeutdata till den angivna filen"
+msgstr "-MF <fil>\tSkriv beroendeutdata till den angivna filen"
#: c.opt:85
msgid "Treat missing header files as generated files"
@@ -8914,23 +8855,20 @@ msgid "Generate phony targets for all headers"
msgstr "Generera låtsasmål för alla huvuden"
#: c.opt:101
-#, fuzzy
msgid "-MQ <target>\tAdd a MAKE-quoted target"
-msgstr "Lägg till ett MAKE-citerat mål"
+msgstr "-MQ <mål>\tLägg till ett MAKE-citerat mål"
#: c.opt:105
-#, fuzzy
msgid "-MT <target>\tAdd an unquoted target"
-msgstr "Lägg till ett ociterat mål"
+msgstr "-MT <mål>\tLägg till ett ociterat mål"
#: c.opt:109
msgid "Do not generate #line directives"
msgstr "Generera inte #line-direktiv"
#: c.opt:113
-#, fuzzy
msgid "-U<macro>\tUndefine <macro>"
-msgstr "Avdefiniera <makro>"
+msgstr "-U<makro>\tAvdefiniera <makro>"
#: c.opt:117
msgid "Warn about things that will change when compiling with an ABI-compliant compiler"
@@ -9153,9 +9091,8 @@ msgid "Warn about NULL being passed to argument slots marked as requiring non-NU
msgstr "Varna om NULL skickas som argument som är markerade att de kräver icke-NULL"
#: c.opt:353
-#, fuzzy
msgid "-Wnormalized=<id|nfc|nfkc>\tWarn about non-normalised Unicode strings"
-msgstr "Varna för icke normaliserade Unicodesträngar"
+msgstr "-Wnormalized=<id|nfc|nfkc>\tVarna för icke normaliserade Unicodesträngar"
#: c.opt:357
msgid "Warn if a C-style cast is used in a program"
@@ -9346,14 +9283,12 @@ msgid "Reduce the size of object files"
msgstr "Reducera storleken på objektfiler"
#: c.opt:559
-#, fuzzy
msgid "-fconst-string-class=<name>\tUse class <name> for constant strings"
-msgstr "Använd klassen <namn> för konstanta strängar"
+msgstr "-fconst-string-class=<namn>\tAnvänd klassen <namn> för konstanta strängar"
#: c.opt:563
-#, fuzzy
msgid "-fno-deduce-init-list\tdisable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list"
-msgstr "avaktivera härledning av std::initializer_list för en malltypparameter från en klammeromsluten initierarlista"
+msgstr "-fno-deduce-init-list\tavaktivera härledning av std::initializer_list för en malltypparameter från en klammeromsluten initierarlista"
#: c.opt:567
msgid "Inline member functions by default"
@@ -9372,18 +9307,16 @@ msgid "Generate code to check exception specifications"
msgstr "Generera kod för att kontrollera undantagsspecifikationer"
#: c.opt:589
-#, fuzzy
msgid "-fexec-charset=<cset>\tConvert all strings and character constants to character set <cset>"
-msgstr "Konvertera alla strängar och teckenkonstanter till teckenuppsättningen <tknst>"
+msgstr "-fexec-charset=<tknst>\tKonvertera alla strängar och teckenkonstanter till teckenuppsättningen <tknst>"
#: c.opt:593
msgid "Permit universal character names (\\u and \\U) in identifiers"
msgstr "Tillåt universella teckennamn (\\u och \\U) i identifierare"
#: c.opt:597
-#, fuzzy
msgid "-finput-charset=<cset>\tSpecify the default character set for source files"
-msgstr "Ange standardteckenuppsättning för källkodsfiler"
+msgstr "-finput-charset=<tknst>\tAnge standardteckenuppsättning för källkodsfiler"
#: c.opt:605
msgid "Scope of for-init-statement variables is local to the loop"
@@ -9530,19 +9463,16 @@ msgid "Display statistics accumulated during compilation"
msgstr "Visa statistik som samlats under kompilering"
#: c.opt:787
-#, fuzzy
msgid "-ftabstop=<number>\tDistance between tab stops for column reporting"
-msgstr "Avstånd mellan tabulatorstopp för kolumnvis rapportering"
+msgstr "-ftabstop=<antal>\tAvstånd mellan tabulatorstopp för kolumnvis rapportering"
#: c.opt:791
-#, fuzzy
msgid "-ftemplate-depth-<number>\tSpecify maximum template instantiation depth"
-msgstr "Ange maximalt instansieringsdjup för mallar"
+msgstr "-ftemplate-depth-<antal>\tAnge maximalt instansieringsdjup för mallar"
#: c.opt:798
-#, fuzzy
msgid "-fno-threadsafe-statics\tDo not generate thread-safe code for initializing local statics"
-msgstr "Generera inte trådsäker kod för initiering a lokala statiska variabler"
+msgstr "-fno-threadsafe-statics\tGenerera inte trådsäker kod för initiering a lokala statiska variabler"
#: c.opt:802
msgid "When \"signed\" or \"unsigned\" is not given make the bitfield unsigned"
@@ -9581,9 +9511,8 @@ msgid "Emit common-like symbols as weak symbols"
msgstr "Mata ut common-liknande symboler som svaga symboler"
#: c.opt:838
-#, fuzzy
msgid "-fwide-exec-charset=<cset>\tConvert all wide strings and character constants to character set <cset>"
-msgstr "Konvertera alla breda strängar och teckenkonstanter till teckenuppsättningen <tknst>"
+msgstr "-fwide-exec-charset=<tknst>\tKonvertera alla breda strängar och teckenkonstanter till teckenuppsättningen <tknst>"
#: c.opt:842
msgid "Generate a #line directive pointing at the current working directory"
@@ -9602,69 +9531,56 @@ msgid "Dump declarations to a .decl file"
msgstr "Skicka deklarationer till en .decl-fil"
#: c.opt:858
-#, fuzzy
msgid "-femit-struct-debug-baseonly\tAggressive reduced debug info for structs"
-msgstr "Aggressivt reducerad felsökningsinformation för poster"
+msgstr "-femit-struct-debug-baseonly\tAggressivt reducerad felsökningsinformation för poster"
#: c.opt:862
-#, fuzzy
msgid "-femit-struct-debug-reduced\tConservative reduced debug info for structs"
-msgstr "Konservativt reducerad felsökningsinformation för poster"
+msgstr "-femit-struct-debug-reduced\tKonservativt reducerad felsökningsinformation för poster"
#: c.opt:866
-#, fuzzy
msgid "-femit-struct-debug-detailed=<spec-list>\tDetailed reduced debug info for structs"
-msgstr "Detaljreducerade felsökningsinformation för poster"
+msgstr "-femit-struct-debug-detaild=<spec-lista>\tDetaljreducerad felsökningsinformation för poster"
#: c.opt:870
-#, fuzzy
msgid "-idirafter <dir>\tAdd <dir> to the end of the system include path"
-msgstr "Lägg till <kat> till slutet av sökvägen för systeminkluderingar"
+msgstr "-idirafter <kat>\tLägg till <kat> till slutet av sökvägen för systeminkluderingar"
#: c.opt:874
-#, fuzzy
msgid "-imacros <file>\tAccept definition of macros in <file>"
-msgstr "Tag med definitioner av makron i <fil>"
+msgstr "-imacros <fil>\tTag med definitioner av makron i <fil>"
#: c.opt:878
-#, fuzzy
msgid "-imultilib <dir>\tSet <dir> to be the multilib include subdirectory"
-msgstr "-imultilib <kat> Sätt <kat> att vara inkluderingsunderbiblioteket för multibibliotek"
+msgstr "-imultilib <kat>\tSätt <kat> att vara inkluderingsunderbiblioteket för multibibliotek"
#: c.opt:882
-#, fuzzy
msgid "-include <file>\tInclude the contents of <file> before other files"
-msgstr "Inkludera innehållet i <fil> före andra filer"
+msgstr "-include <fil>\tInkludera innehållet i <fil> före andra filer"
#: c.opt:886
-#, fuzzy
msgid "-iprefix <path>\tSpecify <path> as a prefix for next two options"
-msgstr "Ange <skvg> som ett prefix för de följande två flaggorna"
+msgstr "-iprefix <skvg>\tAnge <skvg> som ett prefix för de följande två flaggorna"
#: c.opt:890
-#, fuzzy
msgid "-isysroot <dir>\tSet <dir> to be the system root directory"
-msgstr "Sätt <kat> som rotkatalog för systemet"
+msgstr "-isysroot <kat>\tSätt <kat> som rotkatalog för systemet"
#: c.opt:894
-#, fuzzy
msgid "-isystem <dir>\tAdd <dir> to the start of the system include path"
-msgstr "Lägg till <kat> till början av sökvägen för systeminkluderingar"
+msgstr "-isystem <kat>\tLägg till <kat> till början av sökvägen för systeminkluderingar"
#: c.opt:898
-#, fuzzy
msgid "-iquote <dir>\tAdd <dir> to the end of the quote include path"
-msgstr "Lägg till <kat> till slutet av sökvägen för citerade inkluderingar"
+msgstr "-iquote <kat>\tLägg till <kat> till slutet av sökvägen för citerade inkluderingar"
#: c.opt:902
-#, fuzzy
msgid "-iwithprefix <dir>\tAdd <dir> to the end of the system include path"
-msgstr "Lägg till <kat> till slutet av sökvägen för systeminkluderingar"
+msgstr "-iwithprefix <kat>\tLägg till <kat> till slutet av sökvägen för systeminkluderingar"
#: c.opt:906
-#, fuzzy
msgid "-iwithprefixbefore <dir>\tAdd <dir> to the end of the main include path"
-msgstr "Lägg till <kat> till slutet av huvudsökvägen"
+msgstr "-iwithprefixbefore <kat>\tLägg till <kat> till slutet av huvudsökvägen"
#: c.opt:916
msgid "Do not search standard system include directories (those specified with -isystem will still be used)"
@@ -9739,9 +9655,8 @@ msgid "Enable traditional preprocessing"
msgstr "Aktivera traditionell preprocessning"
#: c.opt:1014
-#, fuzzy
msgid "-trigraphs\tSupport ISO C trigraphs"
-msgstr "Stöd trigrafer enligt ISO C"
+msgstr "-trigraphs\tStöd trigrafer enligt ISO C"
#: c.opt:1018
msgid "Do not predefine system-specific and GCC-specific macros"
@@ -9772,28 +9687,24 @@ msgid "Display this information"
msgstr "Visa den här informationen"
#: common.opt:32
-#, fuzzy
msgid "--help=<class>\tDisplay descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params"
-msgstr "Visa beskrivningar av en speciell klass av flaggor. <class> är en eller flera av optimizers, target, warnings, undocumented params"
+msgstr "--help=<klass>\tVisa beskrivningar av en speciell klass av flaggor. <klass> är en eller flera av optimizers, target, warnings, undocumented, params"
#: common.opt:36
msgid "Alias for --help=target"
msgstr "Alias för --help=target"
#: common.opt:55
-#, fuzzy
msgid "--param <param>=<value>\tSet parameter <param> to value. See below for a complete list of parameters"
-msgstr "Sätt parameter <param> till värde. Se nedan för en komplett lista på parametrar"
+msgstr "--param <param>=<värde>\tSätt parameter <param> till värde. Se nedan för en komplett lista på parametrar"
#: common.opt:62
-#, fuzzy
msgid "-G<number>\tPut global and static data smaller than <number> bytes into a special section (on some targets)"
-msgstr "Placera globala and statiska data mindre än <nummer> byte i en speciell sektion (vissa arkitekturer)"
+msgstr "-G<antal>\tPlacera globala and statiska data mindre än <antal> byte i en speciell sektion (vissa arkitekturer)"
#: common.opt:66
-#, fuzzy
msgid "-O<number>\tSet optimization level to <number>"
-msgstr "Sätt optimeringsnivå till <nummer>"
+msgstr "-O<nummer>\tSätt optimeringsnivå till <nummer>"
#: common.opt:70
msgid "Optimize for space rather than speed"
@@ -9844,18 +9755,16 @@ msgid "Exit on the first error occurred"
msgstr "Avsluta vid första felet som uppstår"
#: common.opt:118
-#, fuzzy
msgid "-Wframe-larger-than=<number>\tWarn if a function's stack frame requires more than <number> bytes"
-msgstr "-Wframe-larger-than=<antal> Varna om en funktions stackram kräver mer en <antal> byte"
+msgstr "-Wframe-larger-than=<antal>\tVarna om en funktions stackram kräver mer en <antal> byte"
#: common.opt:122
msgid "Warn when an inlined function cannot be inlined"
msgstr "Varna när en inline:ad funktion inte kan inline:as"
#: common.opt:129
-#, fuzzy
msgid "-Wlarger-than=<number>\tWarn if an object is larger than <number> bytes"
-msgstr "Varna för ett objekt är större än <antal> byte"
+msgstr "-Wlarger-than=<antal>\tVarna för ett objekt är större än <antal> byte"
#: common.opt:133
msgid "Warn if the loop cannot be optimized due to nontrivial assumptions."
@@ -9922,7 +9831,6 @@ msgid "Warn about uninitialized automatic variables"
msgstr "Varna för oinitierade automatiska variabler"
#: common.opt:205
-#, fuzzy
msgid "Does nothing. Preserved for backward compatibility."
msgstr "Gör ingenting. Bevarad för bakåtkompatibilitet."
@@ -9955,24 +9863,20 @@ msgid "Warn instead of error in case profiles in -fprofile-use do not match"
msgstr "Varna istället för att ge fel profiler i -fprofile-use inte stämmer"
#: common.opt:237
-#, fuzzy
msgid "-aux-info <file>\tEmit declaration information into <file>"
-msgstr "Generera deklarationsinfo till <fil>"
+msgstr "-aux-info <fil>\tGenerera deklarationsinfo till <fil>"
#: common.opt:250
-#, fuzzy
msgid "-d<letters>\tEnable dumps from specific passes of the compiler"
-msgstr "Slå på dumpning från specifika pass i kompilatorn"
+msgstr "-d<bokstäver>\tSlå på dumpning från specifika pass i kompilatorn"
#: common.opt:254
-#, fuzzy
msgid "-dumpbase <file>\tSet the file basename to be used for dumps"
-msgstr "Ange basfilnamn att användas för dumpar"
+msgstr "-dumpbase <fil>\tAnge basfilnamn att användas för dumpar"
#: common.opt:258
-#, fuzzy
msgid "-dumpdir <dir>\t\tSet the directory name to be used for dumps"
-msgstr "Ange basfilnamn att användas för dumpar"
+msgstr "-dumpdir <kat>\tAnge katalognamn att användas för dumpar"
#: common.opt:284
msgid "Align the start of functions"
@@ -10039,14 +9943,12 @@ msgid "Restrict target load migration not to re-use registers in any basic block
msgstr "Begränsa migration av målinläsning till att inte återanvända register i något grundblock"
#: common.opt:372
-#, fuzzy
msgid "-fcall-saved-<register>\tMark <register> as being preserved across functions"
-msgstr "Markera att <register> bevaras mellan funktioner"
+msgstr "-fcall-saved-<register>\tMarkera att <register> bevaras mellan funktioner"
#: common.opt:376
-#, fuzzy
msgid "-fcall-used-<register>\tMark <register> as being corrupted by function calls"
-msgstr "Markera att <register> förstörs av funktionsanrop"
+msgstr "-fcall-used-<register>\tMarkera att <register> förstörs av funktionsanrop"
#: common.opt:383
msgid "Save registers around function calls"
@@ -10061,9 +9963,8 @@ msgid "Do not put uninitialized globals in the common section"
msgstr "Lägg inte oinitierade globala i den gemensamma sektionen"
#: common.opt:395
-#, fuzzy
msgid "-fcompare-debug[=<opts>]\tCompile with and without e.g. -gtoggle, and compare the final-insns dump"
-msgstr "-fcompare-debug[=<flgr>] Kompilera med och utan t.ex. -gtoggle, och jämför slutinstruktionsdumpen"
+msgstr "-fcompare-debug[=<flgr>]\tKompilera med och utan t.ex. -gtoggle, och jämför slutinstruktionsdumpen"
#: common.opt:399
msgid "Run only the second compilation of -fcompare-debug"
@@ -10108,9 +10009,8 @@ msgid "List all available debugging counters with their limits and counts."
msgstr "Lista alla tillgängliga felsökningsräknare med deras gränser och värden."
#: common.opt:439
-#, fuzzy
msgid "-fdbg-cnt=<counter>:<limit>[,<counter>:<limit>,...]\tSet the debug counter limit. "
-msgstr "-fdbg-cnt=<räknare>:<gräns>[,<räknare>:<gräns>,...] Sätt gränsen för felsökningsräknare. "
+msgstr "-fdbg-cnt=<räknare>:<gräns>[,<räknare>:<gräns>,...]\tSätt gränsen för felsökningsräknare. "
#: common.opt:443
msgid "Map one directory name to another in debug information"
@@ -10129,23 +10029,20 @@ msgid "Delete useless null pointer checks"
msgstr "Tag bort onödiga nollpekarkontroller"
#: common.opt:461
-#, fuzzy
msgid "-fdiagnostics-show-location=[once|every-line]\tHow often to emit source location at the beginning of line-wrapped diagnostics"
-msgstr "Anger hur ofta källkodspositioner skall skrivas ut i början av utskrift vid radbrytning"
+msgstr "-fdiagnostics-show-location=[once|every-line]\tAnger hur ofta källkodspositioner skall skrivas ut i början av utskrift vid radbrytning"
#: common.opt:465
msgid "Amend appropriate diagnostic messages with the command line option that controls them"
msgstr "Lägg till lämpliga diagnostiska meddelanden till kommandoradsflaggan som styr dem"
#: common.opt:469
-#, fuzzy
msgid "-fdump-<type>\tDump various compiler internals to a file"
-msgstr "Skriv ut diverse intern kompilatorinformation till en fil"
+msgstr "-fdump-<typ>\tSkriv ut diverse intern kompilatorinformation till en fil"
#: common.opt:473
-#, fuzzy
msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of translation"
-msgstr "Skriv till filnamn instruktionerna vid slutet av översättningen"
+msgstr "-fdump-final-insns=filnamn\tSkriv instruktionerna vid slutet av översättningen till filnamn"
#: common.opt:477
msgid "Suppress output of addresses in debugging dumps"
@@ -10196,9 +10093,8 @@ msgid "Perform a number of minor, expensive optimizations"
msgstr "Utför ett antal smärre, dyra optimeringar"
#: common.opt:529
-#, fuzzy
msgid "-fexcess-precision=[fast|standard]\tSpecify handling of excess floating-point precision"
-msgstr "Ange hantering av överskjutande precision på flyttal"
+msgstr "-fexecc-precision=[fast|standard]\tAnge hantering av överskjutande precision på flyttal"
#: common.opt:536
msgid "Assume no NaNs or infinities are generated"
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 2555dc8b33c..ee90f358d9e 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1,6 +1,6 @@
/* Reload pseudo regs into hard regs for insns that require hard regs.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -2570,7 +2570,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
else if (reg_renumber && reg_renumber[regno] < 0
&& reg_equiv_invariant && reg_equiv_invariant[regno])
{
- if (may_use_invariant)
+ if (may_use_invariant || (insn && DEBUG_INSN_P (insn)))
return eliminate_regs_1 (copy_rtx (reg_equiv_invariant[regno]),
mem_mode, insn, true);
/* There exists at least one use of REGNO that cannot be
@@ -2685,9 +2685,11 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
if (ep->from_rtx == XEXP (x, 0) && ep->can_eliminate)
{
if (! mem_mode
- /* Refs inside notes don't count for this purpose. */
+ /* Refs inside notes or in DEBUG_INSNs don't count for
+ this purpose. */
&& ! (insn != 0 && (GET_CODE (insn) == EXPR_LIST
- || GET_CODE (insn) == INSN_LIST)))
+ || GET_CODE (insn) == INSN_LIST
+ || DEBUG_INSN_P (insn))))
ep->ref_outside_mem = 1;
return
@@ -2863,6 +2865,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
return x;
case CLOBBER:
+ gcc_assert (insn && DEBUG_INSN_P (insn));
+ break;
+
case ASM_OPERANDS:
case SET:
gcc_unreachable ();
@@ -3199,6 +3204,9 @@ eliminate_regs_in_insn (rtx insn, int replace)
|| GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC
|| GET_CODE (PATTERN (insn)) == ASM_INPUT
|| DEBUG_INSN_P (insn));
+ if (DEBUG_INSN_P (insn))
+ INSN_VAR_LOCATION_LOC (insn)
+ = eliminate_regs (INSN_VAR_LOCATION_LOC (insn), VOIDmode, insn);
return 0;
}
diff --git a/gcc/reorg.c b/gcc/reorg.c
index b1de4bec60f..c649dfc9b12 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3253,13 +3253,10 @@ delete_prior_computation (rtx note, rtx insn)
/* Delete INSN and recursively delete insns that compute values used only
by INSN. This uses the REG_DEAD notes computed during flow analysis.
- If we are running before flow.c, we need do nothing since flow.c will
- delete dead code. We also can't know if the registers being used are
- dead or not at this point.
- Otherwise, look at all our REG_DEAD notes. If a previous insn does
- nothing other than set a register that dies in this insn, we can delete
- that insn as well.
+ Look at all our REG_DEAD notes. If a previous insn does nothing other
+ than set a register that dies in this insn, we can delete that insn
+ as well.
On machines with CC0, if CC0 is used in this insn, we may be able to
delete the insn that set it. */
diff --git a/gcc/rtl.def b/gcc/rtl.def
index 54f2a6028dd..e7ebb21a43f 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -486,7 +486,7 @@ DEF_RTL_EXPR(UMAX, "umax", "ee", RTX_COMM_ARITH)
because they can be understood from the machine-mode of the
containing MEM. These operations exist in only two cases:
1. pushes onto the stack.
- 2. created automatically by the life_analysis pass in flow.c. */
+ 2. created automatically by the auto-inc-dec pass. */
DEF_RTL_EXPR(PRE_DEC, "pre_dec", "e", RTX_AUTOINC)
DEF_RTL_EXPR(PRE_INC, "pre_inc", "e", RTX_AUTOINC)
DEF_RTL_EXPR(POST_DEC, "post_dec", "e", RTX_AUTOINC)
diff --git a/gcc/sel-sched-dump.c b/gcc/sel-sched-dump.c
index dbf1c34fccc..c45984420e4 100644
--- a/gcc/sel-sched-dump.c
+++ b/gcc/sel-sched-dump.c
@@ -391,7 +391,7 @@ dump_lv_set (regset lv)
{
sel_print ("{");
- /* This code was adapted from flow.c: dump_regset (). */
+ /* This code was adapted from cfg.c: dump_regset (). */
if (lv == NULL)
sel_print ("nil");
else
diff --git a/gcc/sese.c b/gcc/sese.c
index f959bdb269e..6fb406521ee 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -526,49 +526,31 @@ set_rename (htab_t map, tree old_name, tree expr)
*slot = new_rename_map_elt (old_name, expr);
}
-static void rename_variables_in_expr (htab_t, tree);
-
-/* Renames the operand OP of expression T following the tuples
- (OLD_NAME, EXPR) in RENAME_MAP. */
-
-static void
-rename_variables_in_operand (htab_t rename_map, tree t, int op)
-{
- tree operand = TREE_OPERAND (t, op);
-
- if (TREE_CODE (operand) == SSA_NAME)
- {
- tree new_name = get_rename (rename_map, operand);
-
- if (new_name != operand)
- TREE_OPERAND (t, op) = new_name;
- }
- else
- rename_variables_in_expr (rename_map, operand);
-}
-
/* Renames the expression T following the tuples (OLD_NAME, EXPR) in
- RENAME_MAP. */
+ the rename map M. Returns the expression T after renaming. */
-static void
-rename_variables_in_expr (htab_t rename_map, tree t)
+static tree
+rename_variables_in_expr (htab_t m, tree t)
{
if (!t)
- return;
+ return t;
+
+ if (TREE_CODE (t) == SSA_NAME)
+ return get_rename (m, t);
switch (TREE_CODE_LENGTH (TREE_CODE (t)))
{
case 3:
- rename_variables_in_operand (rename_map, t, 2);
+ TREE_OPERAND (t, 2) = rename_variables_in_expr (m, TREE_OPERAND (t, 2));
case 2:
- rename_variables_in_operand (rename_map, t, 1);
+ TREE_OPERAND (t, 1) = rename_variables_in_expr (m, TREE_OPERAND (t, 1));
case 1:
- rename_variables_in_operand (rename_map, t, 0);
+ TREE_OPERAND (t, 0) = rename_variables_in_expr (m, TREE_OPERAND (t, 0));
default:
- return;
+ return t;
}
}
@@ -582,9 +564,22 @@ rename_nb_iterations (htab_t rename_map)
struct loop *loop;
FOR_EACH_LOOP (li, loop, 0)
- {
- rename_variables_in_expr (rename_map, loop->nb_iterations);
- }
+ loop->nb_iterations = rename_variables_in_expr (rename_map,
+ loop->nb_iterations);
+}
+
+/* Renames all the parameters of SESE following the tuples (OLD_NAME,
+ EXPR) in RENAME_MAP. */
+
+void
+rename_sese_parameters (htab_t rename_map, sese region)
+{
+ int i;
+ tree p;
+
+ for (i = 0; VEC_iterate (tree, SESE_PARAMS (region), i, p); i++)
+ VEC_replace (tree, SESE_PARAMS (region), i,
+ rename_variables_in_expr (rename_map, p));
}
/* Adjusts the phi nodes in the block BB for variables defined in
diff --git a/gcc/sese.h b/gcc/sese.h
index 20dd1b023da..980ade9850b 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -264,6 +264,7 @@ extern hashval_t rename_map_elt_info (const void *);
extern int eq_rename_map_elts (const void *, const void *);
extern void set_rename (htab_t, tree, tree);
extern void rename_nb_iterations (htab_t);
+extern void rename_sese_parameters (htab_t, sese);
/* Constructs a new SCEV_INFO_STR structure for VAR and INSTANTIATED_BELOW. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b7ea3a29647..a06de9a9f4a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,64 @@
+2010-02-15 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/43068
+ * g++.dg/torture/pr43068.C: New testcase.
+
+2010-02-14 Volker Reichelt <reichelt@gcc.gnu.org>
+
+ PR c++/43024
+ * g++.dg/opt/ice1.C: New.
+
+2010-02-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/41997
+ * g++.dg/cpp0x/initlist-opt.C: New.
+
+2010-02-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/41113
+ PR fortran/41117
+ * gfortran.dg/internal_pack_6.f90: New test.
+
+2010-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/43054
+ * g++.dg/cpp0x/variadic99.C: New.
+
+2010-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/guality/guality.h (GUALCVT): Zero extend instead of
+ sign extend pointers to gualchk_t.
+
+ PR c++/43033
+ * g++.dg/other/default3.C: Xfail g4 test.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/43012
+ * gcc.dg/graphite/pr43012.c: New.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42930
+ * g++.dg/graphite/pr42930.C: New.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42914
+ PR middle-end/42530
+ * gcc.dg/graphite/pr42530.c: New.
+ * gcc.dg/graphite/pr42914.c: New.
+
+2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/42771
+ * gcc.dg/graphite/pr42771.c: New.
+
+2010-02-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/42998
+ * gcc.c-torture/compile/pr42998.c: New testcase.
+
2010-02-10 Jason Merrill <jason@redhat.com>
PR c++/41896
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C b/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C
new file mode 100644
index 00000000000..f515ed89d98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C
@@ -0,0 +1,19 @@
+// PR c++/41997
+// { dg-options "-std=c++0x -O2 -fdump-tree-optimized" }
+// { dg-final { scan-tree-dump-not "_0" "optimized" } }
+// { dg-final { cleanup-tree-dump "optimized" } }
+
+#include <initializer_list>
+
+int max_val(std::initializer_list<int> il)
+{
+ int i = *(il.begin());
+ int j = *(il.begin() + 1);
+ return (i > j ? i : j);
+}
+
+int main(void)
+{
+ return max_val({1,2});
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic99.C b/gcc/testsuite/g++.dg/cpp0x/variadic99.C
new file mode 100644
index 00000000000..457212712bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic99.C
@@ -0,0 +1,22 @@
+// PR c++/43054
+// { dg-options "-std=c++0x" }
+
+template<typename R> struct future { };
+
+template<typename Fn, typename... Args>
+ auto
+ async(Fn&& fn, Args&&... args)
+ -> future<decltype(fn(args...))>;
+
+template<typename Fn, typename... Args>
+ auto
+ async(Fn&& fn, Args&&... args)
+ -> future<decltype(fn(args...))>;
+
+int work2(int value);
+
+void work(int value)
+{
+ async(work2, value);
+}
+
diff --git a/gcc/testsuite/g++.dg/graphite/pr42930.C b/gcc/testsuite/g++.dg/graphite/pr42930.C
new file mode 100644
index 00000000000..c1150ce9353
--- /dev/null
+++ b/gcc/testsuite/g++.dg/graphite/pr42930.C
@@ -0,0 +1,55 @@
+/* { dg-options "-O1 -floop-block" } */
+
+typedef unsigned char byte;
+typedef unsigned int uint;
+typedef unsigned char uint8;
+namespace Common {
+class NonCopyable {
+};
+template<class In, class Out>
+Out copy(In first, In last, Out dst) {
+ while (first != last)
+ *dst++ = *first++;
+}
+template<class T>
+class Array {
+ uint _size;
+ T *_storage;
+public:
+ Array<T>& operator=(const Array<T> &array) {
+ copy(array._storage, array._storage + _size, _storage);
+ }
+};
+}
+namespace Graphics {
+struct PixelFormat {
+ inline PixelFormat() {
+ }
+ inline PixelFormat(byte BytesPerPixel,
+ byte RBits, byte GBits, byte BBits, byte ABits,
+ byte RShift, byte GShift, byte BShift, byte AShift) {
+ }
+};
+};
+namespace Cine {
+static const Graphics::PixelFormat kLowPalFormat(2, 3, 3, 3, 0, 8, 4, 0, 0);
+class Palette {
+public:
+ struct Color {
+ uint8 r, g, b;
+ };
+ Palette(const Graphics::PixelFormat format = Graphics::PixelFormat(), const uint numColors = 0);
+ bool empty() const;
+ bool isValid() const;
+ Common::Array<Color> _colors;
+};
+class FWRenderer : public Common::NonCopyable {
+ Cine::Palette _activePal;
+ void drawCommand();
+};
+void FWRenderer::drawCommand() {
+ if (!_activePal.isValid() || _activePal.empty()) {
+ _activePal = Cine::Palette(kLowPalFormat, 16);
+ }
+}
+}
diff --git a/gcc/testsuite/g++.dg/opt/ice1.C b/gcc/testsuite/g++.dg/opt/ice1.C
new file mode 100644
index 00000000000..701897166f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/ice1.C
@@ -0,0 +1,41 @@
+// PR c++/43024
+// { dg-options "-O2" }
+
+void foo();
+
+template<int> struct X
+{
+ enum { e };
+ typedef int Y;
+};
+
+template<int N = 0> struct A
+{
+ ~A() { foo(); }
+ A() { a<0>(0); }
+ template<int> void a(typename X<!X<N>::e>::Y);
+ struct B b();
+};
+
+struct B
+{
+ A<> b0, b1, b2, b3;
+ B operator+ (const B&);
+};
+
+struct C
+{
+ A<> c0, c1, c2, c3, c4, c5, c6, c7, c8;
+};
+
+inline void bar(int i)
+{
+ A<> a0, a1;
+ if (i) a0.b() + a0.b() + a0.b() + a0.b();
+}
+
+void baz()
+{
+ C c;
+ bar(0);
+}
diff --git a/gcc/testsuite/g++.dg/other/default3.C b/gcc/testsuite/g++.dg/other/default3.C
index 324ba7146fe..559cb11265d 100644
--- a/gcc/testsuite/g++.dg/other/default3.C
+++ b/gcc/testsuite/g++.dg/other/default3.C
@@ -25,7 +25,7 @@ template<typename> void g3(int, int);
template<typename> void g3(int = 0, int); // { dg-error "default" }
template<typename> void g4(int, int);
-template<typename> void g4(int = 0, int) {} // { dg-error "default" }
+template<typename> void g4(int = 0, int) {} // { dg-error "default" "" { xfail *-*-* } }
template<typename> void g5();
template<typename> void g5(int = 0, int); // { dg-error "default" }
diff --git a/gcc/testsuite/g++.dg/torture/pr43068.C b/gcc/testsuite/g++.dg/torture/pr43068.C
new file mode 100644
index 00000000000..524fd23ee52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr43068.C
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-freorder-blocks -ftracer} */
+
+struct A {
+ virtual A *f();
+};
+struct B : virtual A {
+ virtual B *f();
+};
+B *B::f() { return 0; }
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42998.c b/gcc/testsuite/gcc.c-torture/compile/pr42998.c
new file mode 100644
index 00000000000..7506d158129
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr42998.c
@@ -0,0 +1,15 @@
+void foo(void *);
+void bar(void *);
+void ndisc_fill_addr_option(unsigned char *opt, int data_len,
+ unsigned short addr_type)
+{
+ int pad;
+ if (addr_type == 32)
+ pad = 2;
+ else
+ pad = 0;
+ __builtin_memset(opt + 2, 0, pad);
+ opt += pad;
+ __builtin_constant_p(data_len) ? foo (opt+2) : bar (opt+2);
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr42530.c b/gcc/testsuite/gcc.dg/graphite/pr42530.c
new file mode 100644
index 00000000000..c0fa299ce97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr42530.c
@@ -0,0 +1,18 @@
+/* { dg-options "-O2 -g -ffast-math -floop-parallelize-all" } */
+
+int array[2][2];
+
+void foo(int *a)
+{
+ int i, j;
+ int sum, tmp = 0;
+
+ for (i=0; i<2; i++)
+ for (j=0; j<2; j++)
+ sum += array[i][j];
+
+ if (sum > 0) {
+ tmp = sum;
+ *a = tmp;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr42771.c b/gcc/testsuite/gcc.dg/graphite/pr42771.c
new file mode 100644
index 00000000000..505fda7eb73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr42771.c
@@ -0,0 +1,19 @@
+/* { dg-options "-O3 -fgraphite-identity" } */
+
+extern int *A;
+extern int B[][4];
+extern void bar(void);
+
+void foo(int im, int jm, int cond)
+{
+ int i, j;
+ if (cond) {
+ for (i = 0; i < 256; i++)
+ A[i] = 0;
+ bar();
+ }
+ for (i = 0; i < im; i++)
+ for (j = 1; j < jm; j++)
+ if (jm != 8 || j != jm >> 1)
+ B[j][0] ^= B[j-1][0];
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr42914.c b/gcc/testsuite/gcc.dg/graphite/pr42914.c
new file mode 100644
index 00000000000..606ee0871f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr42914.c
@@ -0,0 +1,21 @@
+/* { dg-options "-O2 -g -ffast-math -fgraphite-identity" } */
+
+int find_sad_16x16(int *mode)
+{
+ int current, best;
+ int M1[16][16],M0[4][4][4][4],M3[4],M4[4][4];
+ int i,j,k;
+ int ii,jj;
+
+ for (jj=0;jj<4;jj++)
+ for (ii=0;ii<4;ii++)
+ for (j=0;j<4;j++)
+ for (j=0;j<4;j++)
+ current += abs(M0[i][ii][j][jj]);
+
+ if(current < best)
+ {
+ best = current;
+ *mode = k;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr43012.c b/gcc/testsuite/gcc.dg/graphite/pr43012.c
new file mode 100644
index 00000000000..6d0f3b04138
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr43012.c
@@ -0,0 +1,74 @@
+/* This testcase is from PR43012.
+ You will need CLooG-PPL 0.15.8 or later to have this testcase fixed. */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -floop-strip-mine" } */
+
+extern void abort (void);
+
+#ifdef DBG
+extern int printf (const char *, ...);
+#endif
+
+#define LAST_TOKEN 534
+#define FLOAT_FUNCT_TOKEN 64
+#define VECTOR_FUNCT_TOKEN 77
+#define COLOUR_KEY_TOKEN 89
+
+int Table[LAST_TOKEN];
+
+void
+pre_init_tokenizer ()
+{
+ int i;
+
+ for (i = 0; i < LAST_TOKEN; i++)
+ {
+ Table[i] = i;
+ if (i < FLOAT_FUNCT_TOKEN)
+ Table[i] = FLOAT_FUNCT_TOKEN;
+ else
+ {
+ if (i < VECTOR_FUNCT_TOKEN)
+ Table[i] = VECTOR_FUNCT_TOKEN;
+ else
+ {
+ if (i < COLOUR_KEY_TOKEN)
+ Table[i] = COLOUR_KEY_TOKEN;
+ }
+ }
+ }
+}
+
+void
+check ()
+{
+ int i;
+
+ for (i = 0; i < FLOAT_FUNCT_TOKEN; i++)
+ if (Table[i] != FLOAT_FUNCT_TOKEN)
+ abort ();
+ for (i = FLOAT_FUNCT_TOKEN; i < VECTOR_FUNCT_TOKEN; i++)
+ if (Table[i] != VECTOR_FUNCT_TOKEN)
+ abort ();
+ for (i = VECTOR_FUNCT_TOKEN; i < COLOUR_KEY_TOKEN; i++)
+ if (Table[i] != COLOUR_KEY_TOKEN)
+ abort ();
+ for (i = COLOUR_KEY_TOKEN; i < LAST_TOKEN; i++)
+ if (Table[i] != i)
+ abort ();
+}
+
+int
+main ()
+{
+ int i;
+
+ pre_init_tokenizer ();
+#ifdef DBG
+ for (i = 0; i < LAST_TOKEN; i++)
+ printf ("%3d: %d\n", i, Table[i]);
+#endif
+ check ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h
index e82726bdabc..e744d0d72ee 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.h
+++ b/gcc/testsuite/gcc.dg/guality/guality.h
@@ -64,7 +64,11 @@ typedef intmax_t gualchk_t;
#define GUALCVT(val) \
((gualchk_t)__builtin_choose_expr \
(__builtin_types_compatible_p (__typeof (val), gualchk_t), \
- (val), (intptr_t)(val)))
+ (val), \
+ __builtin_choose_expr \
+ (__builtin_classify_type (val) \
+ == __builtin_classify_type (&guality_skip), \
+ (uintptr_t)(val),(intptr_t)(val))))
/* Attach a debugger to the current process and verify that the string
EXPR, evaluated by the debugger, yields the gualchk_t number VAL.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-3.c
new file mode 100644
index 00000000000..7c4236b1cc7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-3.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+void main (void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ f2 ();
+}
+
+/* { dg-final { scan-tree-dump-times "!= 0" 4 "ivopts" } } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_6.f90 b/gcc/testsuite/gfortran.dg/internal_pack_6.f90
new file mode 100644
index 00000000000..c02f7c9bec5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/internal_pack_6.f90
@@ -0,0 +1,57 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Test the fix for PR41113 and PR41117, in which unnecessary calls
+! to internal_pack and internal_unpack were being generated.
+!
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
+!!
+MODULE M1
+ TYPE T1
+ REAL :: data(10) = [(i, i = 1, 10)]
+ END TYPE T1
+CONTAINS
+ SUBROUTINE S1(data, i, chksum)
+ REAL, DIMENSION(*) :: data
+ integer :: i, j
+ real :: subsum, chksum
+ subsum = 0
+ do j = 1, i
+ subsum = subsum + data(j)
+ end do
+ if (abs(subsum - chksum) > 1e-6) call abort
+ END SUBROUTINE S1
+END MODULE
+
+SUBROUTINE S2
+ use m1
+ TYPE(T1) :: d
+
+ real :: data1(10) = [(i, i = 1, 10)]
+ REAL :: data(-4:5,-4:5) = reshape ([(real(i), i = 1, 100)], [10,10])
+
+! PR41113
+ CALL S1(d%data, 10, sum (d%data))
+ CALL S1(data1, 10, sum (data1))
+
+! PR41117
+ DO i=-4,5
+ CALL S1(data(:,i), 10, sum (data(:,i)))
+ ENDDO
+! Being non-contiguous, this is the only time that _internal_pack is called
+ DO i=-4,5
+ CALL S1(data(-2:,i), 8, sum (data(-2:,i)))
+ ENDDO
+ DO i=-4,4
+ CALL S1(data(:,i:i+1), 20, sum (reshape (data(:,i:i+1), [20])))
+ ENDDO
+ DO i=-4,5
+ CALL S1(data(2,i), 1, data(2,i))
+ ENDDO
+END SUBROUTINE S2
+
+ call s2
+end
+! { dg-final { cleanup-modules "M1" } }
+! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 16abb4c5222..7b602012799 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -818,6 +818,77 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
return decl_refs_may_alias_p (base1, offset1, max_size1,
base2, offset2, max_size2);
+ ind1_p = INDIRECT_REF_P (base1);
+ ind2_p = INDIRECT_REF_P (base2);
+ /* Canonicalize the pointer-vs-decl case. */
+ if (ind1_p && var2_p)
+ {
+ HOST_WIDE_INT tmp1;
+ tree tmp2;
+ ao_ref *tmp3;
+ tmp1 = offset1; offset1 = offset2; offset2 = tmp1;
+ tmp1 = max_size1; max_size1 = max_size2; max_size2 = tmp1;
+ tmp2 = base1; base1 = base2; base2 = tmp2;
+ tmp3 = ref1; ref1 = ref2; ref2 = tmp3;
+ var1_p = true;
+ ind1_p = false;
+ var2_p = false;
+ ind2_p = true;
+ }
+
+ /* If we are about to disambiguate pointer-vs-decl try harder to
+ see must-aliases and give leeway to some invalid cases.
+ This covers a pretty minimal set of cases only and does not
+ when called from the RTL oracle. It handles cases like
+
+ int i = 1;
+ return *(float *)&i;
+
+ and also fixes gfortran.dg/lto/pr40725. */
+ if (var1_p && ind2_p
+ && cfun
+ && gimple_in_ssa_p (cfun)
+ && TREE_CODE (TREE_OPERAND (base2, 0)) == SSA_NAME)
+ {
+ gimple def_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (base2, 0));
+ while (is_gimple_assign (def_stmt)
+ && (gimple_assign_rhs_code (def_stmt) == SSA_NAME
+ || CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt))))
+ {
+ tree rhs = gimple_assign_rhs1 (def_stmt);
+ HOST_WIDE_INT offset, size, max_size;
+
+ /* Look through SSA name copies and pointer conversions. */
+ if (TREE_CODE (rhs) == SSA_NAME
+ && POINTER_TYPE_P (TREE_TYPE (rhs)))
+ {
+ def_stmt = SSA_NAME_DEF_STMT (rhs);
+ continue;
+ }
+ if (TREE_CODE (rhs) != ADDR_EXPR)
+ break;
+
+ /* If the pointer is defined as an address based on a decl
+ use plain offset disambiguation and ignore TBAA. */
+ rhs = TREE_OPERAND (rhs, 0);
+ rhs = get_ref_base_and_extent (rhs, &offset, &size, &max_size);
+ if (SSA_VAR_P (rhs))
+ {
+ base2 = rhs;
+ offset2 += offset;
+ if (size != max_size
+ || max_size == -1)
+ max_size2 = -1;
+ return decl_refs_may_alias_p (base1, offset1, max_size1,
+ base2, offset2, max_size2);
+ }
+
+ /* Do not continue looking through &p->x to limit time
+ complexity. */
+ break;
+ }
+ }
+
/* First defer to TBAA if possible. */
if (tbaa_p
&& flag_strict_aliasing
@@ -833,19 +904,12 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
return true;
/* Dispatch to the pointer-vs-decl or pointer-vs-pointer disambiguators. */
- ind1_p = INDIRECT_REF_P (base1);
- ind2_p = INDIRECT_REF_P (base2);
set = tbaa_p ? -1 : 0;
if (var1_p && ind2_p)
return indirect_ref_may_alias_decl_p (ref2->ref, TREE_OPERAND (base2, 0),
offset2, max_size2, set,
ref1->ref, base1,
offset1, max_size1, set);
- else if (ind1_p && var2_p)
- return indirect_ref_may_alias_decl_p (ref1->ref, TREE_OPERAND (base1, 0),
- offset1, max_size1, set,
- ref2->ref, base2,
- offset2, max_size2, set);
else if (ind1_p && ind2_p)
return indirect_refs_may_alias_p (ref1->ref, TREE_OPERAND (base1, 0),
offset1, max_size1, set,
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 436e6ce8fc4..74dadf77897 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -4089,6 +4089,7 @@ determine_use_iv_cost_condition (struct ivopts_data *data,
bitmap depends_on_elim = NULL, depends_on_express = NULL, depends_on;
comp_cost elim_cost, express_cost, cost;
bool ok;
+ tree *control_var, *bound_cst;
/* Only consider real candidates. */
if (!cand->iv)
@@ -4110,9 +4111,21 @@ determine_use_iv_cost_condition (struct ivopts_data *data,
/* Try expressing the original giv. If it is compared with an invariant,
note that we cannot get rid of it. */
- ok = extract_cond_operands (data, use->stmt, NULL, NULL, NULL, &cmp_iv);
+ ok = extract_cond_operands (data, use->stmt, &control_var, &bound_cst,
+ NULL, &cmp_iv);
gcc_assert (ok);
+ /* When the condition is a comparison of the candidate IV against
+ zero, prefer this IV.
+
+ TODO: The constant that we're substracting from the cost should
+ be target-dependent. This information should be added to the
+ target costs for each backend. */
+ if (integer_zerop (*bound_cst)
+ && (operand_equal_p (*control_var, cand->var_after, 0)
+ || operand_equal_p (*control_var, cand->var_before, 0)))
+ elim_cost.cost -= 1;
+
express_cost = get_computation_cost (data, use, cand, false,
&depends_on_express, NULL);
fd_ivopts_data = data;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 285b2c8b0b3..639adcefb23 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3013,14 +3013,18 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
stmts, domstmt);
if (!genop1 || !genop2)
return NULL_TREE;
- genop1 = fold_convert (TREE_TYPE (nary->op[0]),
- genop1);
/* Ensure op2 is a sizetype for POINTER_PLUS_EXPR. It
may be a constant with the wrong type. */
if (nary->opcode == POINTER_PLUS_EXPR)
- genop2 = fold_convert (sizetype, genop2);
+ {
+ genop1 = fold_convert (nary->type, genop1);
+ genop2 = fold_convert (sizetype, genop2);
+ }
else
- genop2 = fold_convert (TREE_TYPE (nary->op[1]), genop2);
+ {
+ genop1 = fold_convert (TREE_TYPE (nary->op[0]), genop1);
+ genop2 = fold_convert (TREE_TYPE (nary->op[1]), genop2);
+ }
folded = fold_build2 (nary->opcode, nary->type,
genop1, genop2);
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index d35186ccff0..eeab5699bca 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ * init.c (read_original_filename): Don't call read_original_directory
+ if _cpp_handle_directive returns 0.
+
2010-01-01 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/41947
diff --git a/libcpp/init.c b/libcpp/init.c
index 522ddbbb638..f5bf0ea7b7d 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -1,7 +1,7 @@
/* CPP Library.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
- 2009 Free Software Foundation, Inc.
+ 2009, 2010 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -595,9 +595,9 @@ read_original_filename (cpp_reader *pfile)
pfile->state.in_directive = 0;
/* If it's a #line directive, handle it. */
- if (token1->type == CPP_NUMBER)
+ if (token1->type == CPP_NUMBER
+ && _cpp_handle_directive (pfile, token->flags & PREV_WHITE))
{
- _cpp_handle_directive (pfile, token->flags & PREV_WHITE);
read_original_directory (pfile);
return;
}
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 57e72b87900..bb6a279f459 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-15 Matthias Klose <doko@ubuntu.com>
+
+ * src/arm/sysv.S (__ARM_ARCH__): Define for processor
+ __ARM_ARCH_7EM__.
+
2010-01-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libffi/40701
diff --git a/libffi/src/arm/sysv.S b/libffi/src/arm/sysv.S
index 4c289c697c7..90643185c7f 100644
--- a/libffi/src/arm/sysv.S
+++ b/libffi/src/arm/sysv.S
@@ -74,7 +74,8 @@
#endif
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
+ || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
+ || defined(__ARM_ARCH_7EM__)
# undef __ARM_ARCH__
# define __ARM_ARCH__ 7
#endif
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index be668b75587..8dace9d17e3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,52 @@
+2010-02-12 Jonathan Wakely <jwakely.gcc@gmail.com>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/42819, DR 1315
+ * include/std/future (async): Use std::result_of for the template
+ argument of the std::future return type; adjust everywhere.
+ * testsuite/30_threads/async/42819.cc: New.
+ * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Adjust
+ dg-error line number.
+ * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
+ * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
+ * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
+ * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
+ * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
+
+2010-02-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * config/abi/pre/gnu.ver: Revert last changes.
+
+2010-02-11 Jason Merrill <jason@redhat.com>
+
+ * include/std/thread (~_Impl_base): Declare inline.
+ * libsupc++/nested_exception.h (~nested_exception): Likewise.
+
+2010-02-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/41975, DR 579
+ * include/bits/hashtable.h (_Hashtable<>::_M_erase_node): Remove.
+ (erase(const_iterator), erase(const_iterator, const_iterator)):
+ Change return type to void.
+ * include/debug/unordered_map: Adjust.
+ * include/debug/unordered_set: Likewise.
+ * testsuite/util/exception/safety.h: Likewise.
+ * testsuite/23_containers/unordered_map/erase/1.cc: Likewise.
+ * testsuite/23_containers/unordered_map/erase/24061-map.cc: Likewise.
+ * testsuite/23_containers/unordered_set/erase/1.cc: Likewise.
+ * testsuite/23_containers/unordered_set/erase/24061-map.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/erase/24061-map.cc:
+ Likewise.
+ * testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/erase/24061-map.cc:
+ Likewise.
+
+2010-02-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * config/abi/pre/gnu.ver: Avoid exporting inadvertently
+ std::nested_exception symbols at GLIBCXX_3.4.
+
2010-02-10 Jason Merrill <jason@redhat.com>
Core issue 906
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 96bb8ac63e6..6d469322361 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -385,9 +385,6 @@ namespace std
iterator
_M_insert(const value_type&, std::false_type);
- void
- _M_erase_node(_Node*, _Node**);
-
public:
// Insert and erase
_Insert_Return_Type
@@ -407,13 +404,13 @@ namespace std
insert(initializer_list<value_type> __l)
{ this->insert(__l.begin(), __l.end()); }
- iterator
+ void
erase(const_iterator);
size_type
erase(const key_type&);
- iterator
+ void
erase(const_iterator, const_iterator);
void
@@ -977,34 +974,6 @@ namespace std
return iterator(__new_node, _M_buckets + __n);
}
- // For erase(iterator) and erase(const_iterator).
- template<typename _Key, typename _Value,
- typename _Allocator, typename _ExtractKey, typename _Equal,
- typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
- bool __chc, bool __cit, bool __uk>
- void
- _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
- _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
- _M_erase_node(_Node* __p, _Node** __b)
- {
- _Node* __cur = *__b;
- if (__cur == __p)
- *__b = __cur->_M_next;
- else
- {
- _Node* __next = __cur->_M_next;
- while (__next != __p)
- {
- __cur = __next;
- __next = __cur->_M_next;
- }
- __cur->_M_next = __next->_M_next;
- }
-
- _M_deallocate_node(__p);
- --_M_element_count;
- }
-
template<typename _Key, typename _Value,
typename _Allocator, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
@@ -1030,17 +999,30 @@ namespace std
typename _Allocator, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
bool __chc, bool __cit, bool __uk>
- typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
- _H1, _H2, _Hash, _RehashPolicy,
- __chc, __cit, __uk>::iterator
+ void
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
erase(const_iterator __it)
{
- iterator __result(__it._M_cur_node, __it._M_cur_bucket);
- ++__result;
- _M_erase_node(__it._M_cur_node, __it._M_cur_bucket);
- return __result;
+ _Node* __p = __it._M_cur_node;
+ _Node** __b = __it._M_cur_bucket;
+
+ _Node* __cur = *__b;
+ if (__cur == __p)
+ *__b = __cur->_M_next;
+ else
+ {
+ _Node* __next = __cur->_M_next;
+ while (__next != __p)
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ __cur->_M_next = __next->_M_next;
+ }
+
+ _M_deallocate_node(__p);
+ --_M_element_count;
}
template<typename _Key, typename _Value,
@@ -1102,17 +1084,17 @@ namespace std
typename _Allocator, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
bool __chc, bool __cit, bool __uk>
- typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
- _H1, _H2, _Hash, _RehashPolicy,
- __chc, __cit, __uk>::iterator
+ void
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
erase(const_iterator __first, const_iterator __last)
{
- while (__first != __last)
- __first = this->erase(__first);
- return iterator(__last._M_cur_node, __last._M_cur_bucket);
- }
+ if (__first == begin() && __last == end())
+ clear();
+ else
+ while (__first != __last)
+ erase(__first++);
+ }
template<typename _Key, typename _Value,
typename _Allocator, typename _ExtractKey, typename _Equal,
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index a5e6174fe6a..5f49aa6059b 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -243,25 +243,24 @@ namespace __debug
return __ret;
}
- iterator
+ void
erase(const_iterator __it)
{
__glibcxx_check_erase(__it);
__it._M_invalidate();
- return iterator(_Base::erase(__it.base()), this);
+ _Base::erase(__it.base());
}
- iterator
+ void
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
for (const_iterator __tmp = __first; __tmp != __last;)
- {
- const_iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- return iterator(_Base::erase(__first.base(),
- __last.base()), this);
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
}
_Base&
@@ -480,25 +479,24 @@ namespace __debug
return __ret;
}
- iterator
+ void
erase(const_iterator __it)
{
__glibcxx_check_erase(__it);
__it._M_invalidate();
- return iterator(_Base::erase(__it.base()), this);
+ _Base::erase(__it.base());
}
- iterator
+ void
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
for (const_iterator __tmp = __first; __tmp != __last;)
- {
- const_iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- return iterator(_Base::erase(__first.base(),
- __last.base()), this);
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
}
_Base&
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
index f8517184023..8efe3fb51ad 100644
--- a/libstdc++-v3/include/debug/unordered_set
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -243,25 +243,24 @@ namespace __debug
return __ret;
}
- iterator
+ void
erase(const_iterator __it)
{
__glibcxx_check_erase(__it);
__it._M_invalidate();
- return iterator(_Base::erase(__it.base()), this);
+ _Base::erase(__it.base());
}
- iterator
+ void
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
for (const_iterator __tmp = __first; __tmp != __last;)
- {
- const_iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- return iterator(_Base::erase(__first.base(),
- __last.base()), this);
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
}
_Base&
@@ -478,25 +477,24 @@ namespace __debug
return __ret;
}
- iterator
+ void
erase(const_iterator __it)
{
__glibcxx_check_erase(__it);
__it._M_invalidate();
- return iterator(_Base::erase(__it.base()), this);
+ _Base::erase(__it.base());
}
- iterator
+ void
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
for (const_iterator __tmp = __first; __tmp != __last;)
- {
- const_iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- return iterator(_Base::erase(__first.base(),
- __last.base()), this);
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
}
_Base&
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 1ef03643d04..c97682dfff1 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -119,11 +119,14 @@ namespace std
enum class launch { any, async, sync };
template<typename _Fn, typename... _Args>
- future<typename _Fn::result_type>
+ future<typename result_of<_Fn(_Args...)>::type>
async(launch __policy, _Fn&& __fn, _Args&&... __args);
template<typename _Fn, typename... _Args>
- future<typename _Fn::result_type>
+ typename
+ enable_if<!is_same<typename decay<_Fn>::type, launch>::value,
+ future<decltype(std::declval<_Fn>()(std::declval<_Args>()...))>
+ >::type
async(_Fn&& __fn, _Args&&... __args);
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
@@ -558,7 +561,7 @@ namespace std
friend class promise<_Res>;
template<typename> friend class packaged_task;
template<typename _Fn, typename... _Args>
- friend future<typename _Fn::result_type>
+ friend future<typename result_of<_Fn(_Args...)>::type>
async(launch, _Fn&&, _Args&&...);
typedef __basic_future<_Res> _Base_type;
@@ -599,7 +602,7 @@ namespace std
friend class promise<_Res&>;
template<typename> friend class packaged_task;
template<typename _Fn, typename... _Args>
- friend future<typename _Fn::result_type>
+ friend future<typename result_of<_Fn(_Args...)>::type>
async(launch, _Fn&&, _Args&&...);
typedef __basic_future<_Res&> _Base_type;
@@ -640,7 +643,7 @@ namespace std
friend class promise<void>;
template<typename> friend class packaged_task;
template<typename _Fn, typename... _Args>
- friend future<typename _Fn::result_type>
+ friend future<typename result_of<_Fn(_Args...)>::type>
async(launch, _Fn&&, _Args&&...);
typedef __basic_future<void> _Base_type;
@@ -1322,10 +1325,10 @@ namespace std
};
template<typename _Fn, typename... _Args>
- future<typename _Fn::result_type>
+ future<typename result_of<_Fn(_Args...)>::type>
async(launch __policy, _Fn&& __fn, _Args&&... __args)
{
- typedef typename _Fn::result_type result_type;
+ typedef typename result_of<_Fn(_Args...)>::type result_type;
std::shared_ptr<__future_base::_State> __state;
if (__policy == launch::async)
{
@@ -1343,7 +1346,10 @@ namespace std
}
template<typename _Fn, typename... _Args>
- future<typename _Fn::result_type>
+ inline typename
+ enable_if<!is_same<typename decay<_Fn>::type, launch>::value,
+ future<decltype(std::declval<_Fn>()(std::declval<_Args>()...))>
+ >::type
async(_Fn&& __fn, _Args&&... __args)
{
return async(launch::any, std::forward<_Fn>(__fn),
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index 628c34a7f98..f72f5e5a3a6 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -97,7 +97,7 @@ namespace std
{
__shared_base_type _M_this_ptr;
- virtual ~_Impl_base();
+ inline virtual ~_Impl_base();
virtual void _M_run() = 0;
};
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 713c33433e0..9fc2f8a74ba 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -63,7 +63,7 @@ namespace std
nested_exception& operator=(const nested_exception&) = default;
- virtual ~nested_exception();
+ inline virtual ~nested_exception();
void
rethrow_nested() const __attribute__ ((__noreturn__))
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc
index f9b74e08c8d..70fb41e68e7 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc
@@ -113,7 +113,7 @@ void test01()
VERIFY( m1.size() == 2 );
VERIFY( ++it10 == m1.end() );
- VERIFY( m1.erase(m1.begin()) != m1.end() );
+ m1.erase(m1.begin());
VERIFY( m1.size() == 1 );
VERIFY( m1.begin() == it11 );
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/24061-map.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/24061-map.cc
index 87ab474a826..759602b9086 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/24061-map.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/24061-map.cc
@@ -51,10 +51,8 @@ void test01()
++it1;
iterator it2 = it1;
++it2;
- iterator it3 = m1.erase(it1);
+ m1.erase(it1);
VERIFY( m1.size() == 9 );
- VERIFY( it3 == it2 );
- VERIFY( *it3 == *it2 );
iterator it4 = m1.begin();
++it4;
@@ -63,10 +61,8 @@ void test01()
iterator it5 = it4;
++it5;
++it5;
- iterator it6 = m1.erase(it4, it5);
+ m1.erase(it4, it5);
VERIFY( m1.size() == 7 );
- VERIFY( it6 == it5 );
- VERIFY( *it6 == *it5 );
const_iterator it7 = m1.begin();
++it7;
@@ -74,10 +70,8 @@ void test01()
++it7;
const_iterator it8 = it7;
++it8;
- const_iterator it9 = m1.erase(it7);
+ m1.erase(it7);
VERIFY( m1.size() == 6 );
- VERIFY( it9 == it8 );
- VERIFY( *it9 == *it8 );
const_iterator it10 = m1.begin();
++it10;
@@ -86,16 +80,11 @@ void test01()
++it11;
++it11;
++it11;
- const_iterator it12 = m1.erase(it10, it11);
+ m1.erase(it10, it11);
VERIFY( m1.size() == 2 );
- VERIFY( it12 == it11 );
- VERIFY( *it12 == *it11 );
- VERIFY( ++it12 == m1.end() );
- iterator it13 = m1.erase(m1.begin(), m1.end());
+ m1.erase(m1.begin(), m1.end());
VERIFY( m1.size() == 0 );
- VERIFY( it13 == it12 );
- VERIFY( it13 == m1.begin() );
}
int main()
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc
index 0aa1a071871..0e60b8a7c68 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc
@@ -113,7 +113,7 @@ void test01()
VERIFY( mm1.size() == 2 );
VERIFY( ++it10 == mm1.end() );
- VERIFY( mm1.erase(mm1.begin()) != mm1.end() );
+ mm1.erase(mm1.begin());
VERIFY( mm1.size() == 1 );
VERIFY( mm1.begin() == it11 );
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/24061-multimap.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/24061-multimap.cc
index 545d08278d6..0fe4eee9c17 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/24061-multimap.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/24061-multimap.cc
@@ -55,10 +55,8 @@ void test01()
++it1;
iterator it2 = it1;
++it2;
- iterator it3 = mm1.erase(it1);
+ mm1.erase(it1);
VERIFY( mm1.size() == 12 );
- VERIFY( it3 == it2 );
- VERIFY( *it3 == *it2 );
iterator it4 = mm1.begin();
++it4;
@@ -67,10 +65,8 @@ void test01()
iterator it5 = it4;
++it5;
++it5;
- iterator it6 = mm1.erase(it4, it5);
+ mm1.erase(it4, it5);
VERIFY( mm1.size() == 10 );
- VERIFY( it6 == it5 );
- VERIFY( *it6 == *it5 );
const_iterator it7 = mm1.begin();
++it7;
@@ -78,10 +74,8 @@ void test01()
++it7;
const_iterator it8 = it7;
++it8;
- const_iterator it9 = mm1.erase(it7);
+ mm1.erase(it7);
VERIFY( mm1.size() == 9 );
- VERIFY( it9 == it8 );
- VERIFY( *it9 == *it8 );
const_iterator it10 = mm1.begin();
++it10;
@@ -90,15 +84,11 @@ void test01()
++it11;
++it11;
++it11;
- const_iterator it12 = mm1.erase(it10, it11);
+ mm1.erase(it10, it11);
VERIFY( mm1.size() == 5 );
- VERIFY( it12 == it11 );
- VERIFY( *it12 == *it11 );
- iterator it13 = mm1.erase(mm1.begin(), mm1.end());
+ mm1.erase(mm1.begin(), mm1.end());
VERIFY( mm1.size() == 0 );
- VERIFY( it13 == mm1.end() );
- VERIFY( it13 == mm1.begin() );
}
int main()
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc
index 9951838e9de..fbd8899e67f 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc
@@ -112,7 +112,7 @@ void test01()
VERIFY( ms1.size() == 2 );
VERIFY( ++it10 == ms1.end() );
- VERIFY( ms1.erase(ms1.begin()) != ms1.end() );
+ ms1.erase(ms1.begin());
VERIFY( ms1.size() == 1 );
VERIFY( ms1.begin() == it11 );
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc
index c5eea6eeebc..568862f4458 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc
@@ -54,10 +54,8 @@ void test01()
++it1;
iterator it2 = it1;
++it2;
- iterator it3 = ms1.erase(it1);
+ ms1.erase(it1);
VERIFY( ms1.size() == 12 );
- VERIFY( it3 == it2 );
- VERIFY( *it3 == *it2 );
iterator it4 = ms1.begin();
++it4;
@@ -66,10 +64,8 @@ void test01()
iterator it5 = it4;
++it5;
++it5;
- iterator it6 = ms1.erase(it4, it5);
+ ms1.erase(it4, it5);
VERIFY( ms1.size() == 10 );
- VERIFY( it6 == it5 );
- VERIFY( *it6 == *it5 );
const_iterator it7 = ms1.begin();
++it7;
@@ -77,10 +73,8 @@ void test01()
++it7;
const_iterator it8 = it7;
++it8;
- const_iterator it9 = ms1.erase(it7);
+ ms1.erase(it7);
VERIFY( ms1.size() == 9 );
- VERIFY( it9 == it8 );
- VERIFY( *it9 == *it8 );
const_iterator it10 = ms1.begin();
++it10;
@@ -89,15 +83,11 @@ void test01()
++it11;
++it11;
++it11;
- const_iterator it12 = ms1.erase(it10, it11);
+ ms1.erase(it10, it11);
VERIFY( ms1.size() == 5 );
- VERIFY( it12 == it11 );
- VERIFY( *it12 == *it11 );
- iterator it13 = ms1.erase(ms1.begin(), ms1.end());
+ ms1.erase(ms1.begin(), ms1.end());
VERIFY( ms1.size() == 0 );
- VERIFY( it13 == ms1.end() );
- VERIFY( it13 == ms1.begin() );
}
int main()
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc
index 8f59773d802..9bfa771462f 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc
@@ -112,7 +112,7 @@ void test01()
VERIFY( s1.size() == 2 );
VERIFY( ++it10 == s1.end() );
- VERIFY( s1.erase(s1.begin()) != s1.end() );
+ s1.erase(s1.begin());
VERIFY( s1.size() == 1 );
VERIFY( s1.begin() == it11 );
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/24061-set.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/24061-set.cc
index b4cdde62d57..6d892085778 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/24061-set.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/24061-set.cc
@@ -50,10 +50,8 @@ void test01()
++it1;
iterator it2 = it1;
++it2;
- iterator it3 = s1.erase(it1);
+ s1.erase(it1);
VERIFY( s1.size() == 9 );
- VERIFY( it3 == it2 );
- VERIFY( *it3 == *it2 );
iterator it4 = s1.begin();
++it4;
@@ -62,10 +60,8 @@ void test01()
iterator it5 = it4;
++it5;
++it5;
- iterator it6 = s1.erase(it4, it5);
+ s1.erase(it4, it5);
VERIFY( s1.size() == 7 );
- VERIFY( it6 == it5 );
- VERIFY( *it6 == *it5 );
const_iterator it7 = s1.begin();
++it7;
@@ -73,10 +69,8 @@ void test01()
++it7;
const_iterator it8 = it7;
++it8;
- const_iterator it9 = s1.erase(it7);
+ s1.erase(it7);
VERIFY( s1.size() == 6 );
- VERIFY( it9 == it8 );
- VERIFY( *it9 == *it8 );
const_iterator it10 = s1.begin();
++it10;
@@ -85,16 +79,11 @@ void test01()
++it11;
++it11;
++it11;
- const_iterator it12 = s1.erase(it10, it11);
+ s1.erase(it10, it11);
VERIFY( s1.size() == 2 );
- VERIFY( it12 == it11 );
- VERIFY( *it12 == *it11 );
- VERIFY( ++it12 == s1.end() );
- iterator it13 = s1.erase(s1.begin(), s1.end());
+ s1.erase(s1.begin(), s1.end());
VERIFY( s1.size() == 0 );
- VERIFY( it13 == s1.end() );
- VERIFY( it13 == s1.begin() );
}
int main()
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
new file mode 100644
index 00000000000..c41606ec63d
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -0,0 +1,59 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-atomic-builtins "" }
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <future>
+#include <testsuite_hooks.h>
+
+int do_work1(int value) { return value; }
+int do_work2(int value) { return value * 2; }
+
+int work1(int value)
+{
+ auto handle = std::async([=] { return do_work2(value); });
+ int tmp = do_work1(value);
+ return tmp + handle.get();
+}
+
+int work2(int value)
+{
+ auto handle = std::async(do_work2, value);
+ int tmp = do_work1(value);
+ return tmp + handle.get();
+}
+
+// libstdc++/42819
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ VERIFY( work1(1) == 3 );
+ VERIFY( work2(2) == 6 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index ecdc27c3b8d..eef41497055 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -4,7 +4,7 @@
// { dg-require-gthreads "" }
// { dg-require-atomic-builtins "" }
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 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
@@ -35,4 +35,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 34 }
-// { dg-error "deleted function" "" { target *-*-* } 578 }
+// { dg-error "deleted function" "" { target *-*-* } 581 }
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index c76075da120..14d7046bed5 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -4,7 +4,7 @@
// { dg-require-gthreads "" }
// { dg-require-atomic-builtins "" }
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 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
@@ -34,4 +34,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 33 }
-// { dg-error "deleted function" "" { target *-*-* } 577 }
+// { dg-error "deleted function" "" { target *-*-* } 580 }
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 69cfdd32aae..2b57a1c5b2f 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -33,4 +33,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 1225 }
+// { dg-error "deleted function" "" { target *-*-* } 1228 }
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index b3fbdbcff3b..baf718354e5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -32,4 +32,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 1224 }
+// { dg-error "deleted function" "" { target *-*-* } 1227 }
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index a52ceae7019..80b5e06e1d0 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -33,4 +33,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 32 }
-// { dg-error "deleted function" "" { target *-*-* } 868 }
+// { dg-error "deleted function" "" { target *-*-* } 871 }
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index 22d44cef341..27884b0bd1a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -32,4 +32,4 @@ void test01()
}
// { dg-error "used here" "" { target *-*-* } 31 }
-// { dg-error "deleted function" "" { target *-*-* } 852 }
+// { dg-error "deleted function" "" { target *-*-* } 855 }
diff --git a/libstdc++-v3/testsuite/util/exception/safety.h b/libstdc++-v3/testsuite/util/exception/safety.h
index 23862bcdbee..2bd1ed96993 100644
--- a/libstdc++-v3/testsuite/util/exception/safety.h
+++ b/libstdc++-v3/testsuite/util/exception/safety.h
@@ -285,9 +285,9 @@ namespace __gnu_test
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator const_iterator;
- iterator (container_type::* _F_erase_point)(const_iterator);
- iterator (container_type::* _F_erase_range)(const_iterator,
- const_iterator);
+ void (container_type::* _F_erase_point)(const_iterator);
+ void (container_type::* _F_erase_range)(const_iterator,
+ const_iterator);
erase_base()
: _F_erase_point(&container_type::erase),
@@ -304,9 +304,9 @@ namespace __gnu_test
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator const_iterator;
- iterator (container_type::* _F_erase_point)(const_iterator);
- iterator (container_type::* _F_erase_range)(const_iterator,
- const_iterator);
+ void (container_type::* _F_erase_point)(const_iterator);
+ void (container_type::* _F_erase_range)(const_iterator,
+ const_iterator);
erase_base()
: _F_erase_point(&container_type::erase),
@@ -321,9 +321,9 @@ namespace __gnu_test
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator const_iterator;
- iterator (container_type::* _F_erase_point)(const_iterator);
- iterator (container_type::* _F_erase_range)(const_iterator,
- const_iterator);
+ void (container_type::* _F_erase_point)(const_iterator);
+ void (container_type::* _F_erase_range)(const_iterator,
+ const_iterator);
erase_base()
: _F_erase_point(&container_type::erase),
@@ -338,9 +338,9 @@ namespace __gnu_test
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator const_iterator;
- iterator (container_type::* _F_erase_point)(const_iterator);
- iterator (container_type::* _F_erase_range)(const_iterator,
- const_iterator);
+ void (container_type::* _F_erase_point)(const_iterator);
+ void (container_type::* _F_erase_range)(const_iterator,
+ const_iterator);
erase_base()
: _F_erase_point(&container_type::erase),