aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2012-12-21 14:32:38 +0000
committerDiego Novillo <dnovillo@google.com>2012-12-21 14:32:38 +0000
commit1b2f55518ef68ddd7602153f0c491aedc5d912be (patch)
treea26d01eb94561cff694543ff84ec7a182c82f322
parent5b800be78a33e80091d59f93d86d4a7249ca220d (diff)
Merged revisions 193458,193460,193462,193493,193518,193520,193528,193545,193566,193579,193593,193609,193613,193635,193642,193664,193683,193707-193708,193718,193739,193766,193773,193780,193782,193786,193789,193792,193800,193835,193840,193867,193877,193893,193913,193925,193935,193947,193955-193958,193975,194012,194014,194023,194025,194027,194029,194041,194062,194065-194066,194069,194071,194084,194101,194110,194113,194115,194117,194122,194160,194171,194175,194177,194184,194233,194236,194253-194254,194268-194269,194277,194287-194290,194292-194294,194296 via svnmerge from
svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch Block rev 194268. It introduces two tests failures in internal code base. ======================================================================= Bugs fixed (http://gcc.gnu.org/bugzilla) Codegen 55142, 55331, 55171, 53912, 55597 Optimizers 55489, 53663 C 48076, 55570 Fortran 55352, 55314 C++ 55320, 53841, 55413, 55446, 53912, 50852, 53039, 53862, 53137, 55503, 55015, 53821, 54947, 54744, 55249, 55058, 54325 git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_7@194664 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog522
-rw-r--r--gcc/ChangeLog.google-4_71712
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/ada/ChangeLog40
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in35
-rw-r--r--gcc/ada/gcc-interface/Makefile.in3
-rw-r--r--gcc/ada/gcc-interface/decl.c26
-rw-r--r--gcc/ada/gcc-interface/trans.c3
-rw-r--r--gcc/ada/s-osinte-hpux-dce.ads9
-rw-r--r--gcc/ada/s-osinte-kfreebsd-gnu.ads26
-rw-r--r--gcc/ada/s-osinte-rtems.adb26
-rw-r--r--gcc/ada/s-taspri-hpux-dce.ads4
-rw-r--r--gcc/ada/s-taspri-lynxos.ads125
-rw-r--r--gcc/ada/s-tpopsp-rtems.adb24
-rw-r--r--gcc/c-family/ChangeLog9
-rw-r--r--gcc/c-family/c-common.c4
-rw-r--r--gcc/cfgexpand.c2
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/common/config/m68k/m68k-common.c8
-rw-r--r--gcc/config.gcc12
-rw-r--r--gcc/config/arm/arm.c23
-rw-r--r--gcc/config/arm/arm.h5
-rw-r--r--gcc/config/avr/rtems.h1
-rw-r--r--gcc/config/darwin.c4
-rw-r--r--gcc/config/i386/i386-protos.h2
-rw-r--r--gcc/config/i386/i386.c451
-rw-r--r--gcc/config/i386/i386.h3
-rw-r--r--gcc/config/i386/i386.md45
-rw-r--r--gcc/config/i386/predicates.md6
-rw-r--r--gcc/config/i386/sse.md53
-rw-r--r--gcc/config/i386/sync.md8
-rw-r--r--gcc/config/ia64/ia64.c21
-rw-r--r--gcc/config/microblaze/rtems.h25
-rw-r--r--gcc/config/microblaze/t-rtems1
-rw-r--r--gcc/config/pa/pa.c74
-rw-r--r--gcc/config/pa/pa.h4
-rw-r--r--gcc/config/pa/pa.md135
-rw-r--r--gcc/config/rs6000/predicates.md6
-rw-r--r--gcc/config/rs6000/rs6000.md84
-rw-r--r--gcc/config/sparc/sol2.h4
-rw-r--r--gcc/config/sparc/sparc.h6
-rw-r--r--gcc/config/sparc/t-rtems22
-rw-r--r--gcc/config/sparc/t-rtems-6422
-rwxr-xr-xgcc/configure8
-rw-r--r--gcc/configure.ac8
-rw-r--r--gcc/coverage.c3
-rw-r--r--gcc/cp/ChangeLog95
-rw-r--r--gcc/cp/class.c11
-rw-r--r--gcc/cp/cp-tree.h13
-rw-r--r--gcc/cp/decl.c5
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/cp/init.c6
-rw-r--r--gcc/cp/parser.c9
-rw-r--r--gcc/cp/pt.c408
-rw-r--r--gcc/cp/semantics.c4
-rw-r--r--gcc/cp/tree.c216
-rw-r--r--gcc/cp/typeck.c6
-rw-r--r--gcc/cse.c4
-rw-r--r--gcc/doc/install.texi6
-rw-r--r--gcc/doc/invoke.texi122
-rw-r--r--gcc/dse.c33
-rw-r--r--gcc/fold-const.c11
-rw-r--r--gcc/fortran/ChangeLog26
-rw-r--r--gcc/fortran/resolve.c19
-rw-r--r--gcc/fortran/target-memory.c4
-rw-r--r--gcc/fortran/trans-decl.c31
-rw-r--r--gcc/fortran/trans-stmt.c12
-rw-r--r--gcc/gcse.c42
-rw-r--r--gcc/ggc-common.c2
-rw-r--r--gcc/gimple-fold.c11
-rw-r--r--gcc/gimple.h18
-rw-r--r--gcc/gimplify.c26
-rw-r--r--gcc/go/ChangeLog11
-rw-r--r--gcc/go/gccgo.texi6
-rw-r--r--gcc/go/go-c.h3
-rw-r--r--gcc/go/go-lang.c8
-rw-r--r--gcc/go/gofrontend/expressions.cc160
-rw-r--r--gcc/go/gofrontend/expressions.h23
-rw-r--r--gcc/go/gofrontend/go.cc5
-rw-r--r--gcc/go/gofrontend/gogo.cc4
-rw-r--r--gcc/go/gofrontend/gogo.h14
-rw-r--r--gcc/go/gofrontend/import.cc29
-rw-r--r--gcc/go/gofrontend/import.h4
-rw-r--r--gcc/go/gofrontend/parse.cc2
-rw-r--r--gcc/go/gofrontend/statements.cc16
-rw-r--r--gcc/go/gofrontend/types.cc164
-rw-r--r--gcc/go/gofrontend/types.h51
-rw-r--r--gcc/go/lang.opt4
-rw-r--r--gcc/ifcvt.c123
-rw-r--r--gcc/lto-opts.c25
-rw-r--r--gcc/lto-wrapper.c6
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/es.po12
-rw-r--r--gcc/pointer-set.c2
-rw-r--r--gcc/prefix.c4
-rw-r--r--gcc/sel-sched-ir.c10
-rw-r--r--gcc/sel-sched.c52
-rw-r--r--gcc/testsuite/ChangeLog216
-rw-r--r--gcc/testsuite/ChangeLog.google-4_7181
-rw-r--r--gcc/testsuite/c-c++-common/pr54988.c20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C32
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic134.C17
-rw-r--r--gcc/testsuite/g++.dg/debug/pr54828.C14
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55331.C14
-rw-r--r--gcc/testsuite/g++.dg/other/abstract3.C2
-rw-r--r--gcc/testsuite/g++.dg/template/meminit3.C12
-rw-r--r--gcc/testsuite/g++.dg/template/new11.C28
-rw-r--r--gcc/testsuite/g++.dg/template/param1.C4
-rw-r--r--gcc/testsuite/g++.dg/template/pr54858.C21
-rw-r--r--gcc/testsuite/g++.dg/template/typedef40.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/20121105-1.C42
-rw-r--r--gcc/testsuite/g++.dg/torture/pr54902.C131
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20121107-1.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr54985.c36
-rw-r--r--gcc/testsuite/gcc.dg/pr53701.c59
-rw-r--r--gcc/testsuite/gcc.dg/pr55019.c41
-rw-r--r--gcc/testsuite/gcc.dg/pr55570.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53663-1.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53663-2.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53663-3.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54877.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54920.c14
-rw-r--r--gcc/testsuite/gcc.target/arm/arm.exp7
-rw-r--r--gcc/testsuite/gcc.target/arm/pr54892.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55142-1.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55142-2.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55597.c18
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_error_4.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_13.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_76.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_class_1.f9016
-rw-r--r--gcc/testsuite/gnat.dg/modular4.adb11
-rw-r--r--gcc/testsuite/gnat.dg/modular4_pkg.ads9
-rw-r--r--gcc/testsuite/gnat.dg/specs/addr1.ads8
-rw-r--r--gcc/testsuite/gnat.dg/specs/atomic1.ads4
-rw-r--r--gcc/testsuite/gnat.dg/stack_check3.adb36
-rw-r--r--gcc/testsuite/gnat.dg/stack_check3.ads5
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp8
-rw-r--r--gcc/toplev.c5
-rw-r--r--gcc/tree-dump.c3
-rw-r--r--gcc/tree-ssa-pre.c11
-rw-r--r--gcc/tree-ssa-sccvn.c3
-rw-r--r--gcc/tree-ssa-tail-merge.c7
-rw-r--r--gcc/tree-ssa-threadedge.c72
-rw-r--r--gcc/tree-vect-data-refs.c7
-rw-r--r--gcc/tree-vect-loop.c5
-rw-r--r--gcc/tree.c9
-rw-r--r--gcc/tree.h10
-rw-r--r--libgcc/ChangeLog40
-rw-r--r--libgcc/Makefile.in4
-rw-r--r--libgcc/config.host10
-rw-r--r--libgcc/config/i386/32/sfp-machine.h2
-rw-r--r--libgcc/config/i386/64/sfp-machine.h2
-rw-r--r--libgcc/emutls.c4
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgfortran/runtime/environ.c42
-rw-r--r--libgo/go/reflect/type.go15
-rw-r--r--libgo/go/reflect/value.go2
-rw-r--r--libgo/go/syscall/libcall_linux.go2
-rw-r--r--libgo/go/syscall/socket.go6
-rw-r--r--libgo/go/syscall/socket_linux.go2
-rwxr-xr-xlibgo/mksysinfo.sh26
-rw-r--r--libgo/runtime/print.c5
-rw-r--r--libgomp/ChangeLog6
-rw-r--r--libgomp/team.c11
-rw-r--r--libstdc++-v3/ChangeLog157
-rw-r--r--libstdc++-v3/Makefile.am2
-rw-r--r--libstdc++-v3/Makefile.in6
-rw-r--r--libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver8
-rwxr-xr-xlibstdc++-v3/configure64
-rw-r--r--libstdc++-v3/configure.ac40
-rw-r--r--libstdc++-v3/doc/Makefile.in4
-rw-r--r--libstdc++-v3/doc/xml/manual/build_hacking.xml160
-rw-r--r--libstdc++-v3/include/Makefile.in4
-rw-r--r--libstdc++-v3/include/bits/atomic_base.h2
-rw-r--r--libstdc++-v3/include/bits/hashtable.h16
-rw-r--r--libstdc++-v3/include/bits/random.h265
-rw-r--r--libstdc++-v3/include/bits/random.tcc28
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h4
-rw-r--r--libstdc++-v3/include/profile/iterator_tracker.h4
-rw-r--r--libstdc++-v3/include/std/condition_variable4
-rw-r--r--libstdc++-v3/include/std/functional7
-rw-r--r--libstdc++-v3/include/std/future3
-rw-r--r--libstdc++-v3/include/tr1/functional7
-rw-r--r--libstdc++-v3/libsupc++/Makefile.am79
-rw-r--r--libstdc++-v3/libsupc++/Makefile.in30
-rw-r--r--libstdc++-v3/po/Makefile.in4
-rw-r--r--libstdc++-v3/python/Makefile.in4
-rw-r--r--libstdc++-v3/src/Makefile.am45
-rw-r--r--libstdc++-v3/src/Makefile.in49
-rw-r--r--libstdc++-v3/src/c++11/Makefile.am22
-rw-r--r--libstdc++-v3/src/c++11/Makefile.in26
-rw-r--r--libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc4
-rw-r--r--libstdc++-v3/src/c++11/compatibility-c++0x.cc2
-rw-r--r--libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc8
-rw-r--r--libstdc++-v3/src/c++98/Makefile.am22
-rw-r--r--libstdc++-v3/src/c++98/Makefile.in26
-rw-r--r--libstdc++-v3/src/c++98/compatibility-list-2.cc2
-rw-r--r--libstdc++-v3/src/c++98/compatibility.cc6
-rw-r--r--libstdc++-v3/testsuite/17_intro/shared_with_static_deps.cc33
-rw-r--r--libstdc++-v3/testsuite/18_support/initializer_list/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/bind/ref_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/function/cons/55320.cc46
-rw-r--r--libstdc++-v3/testsuite/20_util/function/cons/addressof.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/55123.cc28
-rw-r--r--libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/range_access/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/range_access/wchar_t/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/element_access/at_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/3.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/4.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/5.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/6.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/7.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/8.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/cons/9.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after2_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after3_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after4_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after5_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after6_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after7_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after8_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after9_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after2_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after3_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/3.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/4.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/5.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/modifiers/6.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/3.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/4.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/5.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/6.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/operations/7.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/capacity/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/capacity/1.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/1.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/1_c++0x.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/2.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/3.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/1.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/2.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/2_c++0x.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/3.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/3.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/3_c++0x.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/4.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/4.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/42352.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/5.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/operations/5.h2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/final_hash.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/final_hash.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc40
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/final_hash.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc20
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit2.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/24_iterators/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/3.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/34595.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/deque_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_backward/deque_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/3.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/50119.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_n/move_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill_n/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move/deque_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move_backward/deque_iterators/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pop_heap/empty2_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pop_heap/empty_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc2
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/cons/55215.cc58
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc60
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/cons/55215.cc58
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc58
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc58
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/cons/55215.cc58
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/28_regex/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc50
-rw-r--r--libstdc++-v3/testsuite/Makefile.in4
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/range_access.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/25_algorithms/copy_deque_iterators.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/3_function_objects/function/10.cc41
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc2
402 files changed, 7345 insertions, 1963 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d953e4bd264..629141ea7c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,8 +1,509 @@
+2012-12-07 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-12-06 Uros Bizjak <ubizjak@gmail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/55597
+ * config/i386/i386.c (legitimize_tls_address): Zero-extend x to Pmode,
+ before using it as insn or call equivalent.
+
+2012-12-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/55032
+ * tree.c (build_array_type_1): Re-layout if we found it in the
+ hash table.
+
+2012-12-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * config/pa/pa.md: Use "const_int 0" instead of match_test to simplify
+ opaque cond in all call insns.
+
+2012-12-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/ia64/ia64.c (ia64_compute_frame_size): Allocate the scratch
+ area if the function allocates dynamic stack space.
+ (ia64_initial_elimination_offset): Adjust offsets to above change.
+
+2012-12-03 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-09-24 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53663
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Conditional
+ native encode/interpret translation on VN_WALKREWRITE.
+
+2012-12-03 Kai Tietz <ktietz@redhat.com>
+
+ PR target/53912
+ * ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t.
+
+ PR target/53912
+ * tree-dump.c (dump_pointer): Print pointer via HOST_WIDE_INT_PRINT.
+
+ PR target/53912
+ * pointer-set.c (hash1): Cast from pointer via uintptr_t.
+
+2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ Backport from mainline:
+ 2012-11-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/55195
+ * config/pa/pa.md (type): Add sibcall and sh_func_adrs insn types.
+ (in_branch_delay): Don't allow sibcall or sh_func_adrs insns.
+ (in_nullified_branch_delay): Likewise.
+ (in_call_delay): Likewise.
+ Define delay for sibcall insns. Adjust Z3 and Z4 insn reservations for
+ new types. Add opaque cond to mark all calls, sibcalls, dyncalls and
+ the $$sh_func_adrs call as variable. Update type of sibcalls and
+ $$sh_func_adrs call.
+ * config/pa/pa.c (pa_adjust_insn_length): Revise to return updated
+ length instead of adjustment. Handle negative and undefined call
+ adjustments for insn_default_length. Remove adjustment for millicode
+ insn with unfilled delay slot.
+ (pa_output_millicode_call): Update for revised millicode length.
+ * config/pa/pa.h (ADJUST_INSN_LENGTH): Revise to set LENGTH.
+
+2012-11-29 Kai Tietz <ktietz@redhat.com>
+
+ PR target/55171
+ * prefix.c (lookup_key): Replace xmalloc/xrealloc
+ use by XNEWVEC/XRESIZEVEC.
+
+ * i386.c (get_scratch_register_on_entry): Handle
+ thiscall-convention.
+ (split_stack_prologue_scratch_regno): Likewise.
+ (ix86_static_chain): Likewise.
+ (x86_output_mi_thunk): Likewise.
+
+2012-11-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backported from mainline
+ 2012-11-27 H.J. Lu <hongjiu.lu@intel.com>
+ Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR lto/54795
+ * lto-opts.c (lto_write_options): Also handle
+ OPT_SPECIAL_unknown, OPT_SPECIAL_ignore and
+ OPT_SPECIAL_program_name.
+
+ PR lto/55474
+ * lto-wrapper.c (merge_and_complain): Handle
+ OPT_SPECIAL_unknown, OPT_SPECIAL_ignore,
+ OPT_SPECIAL_program_name and OPT_SPECIAL_input_file.
+
+2012-11-27 Paolo Bonzini <pbonzini@redhat.com>
+
+ PR rtl-optimization/55489
+ * gcse.c (compute_transp): Precompute a canonical version
+ of XEXP (x, 0), and pass it to canon_true_dependence.
+
+2012-11-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55331
+ * gimple-fold.c (gimplify_and_update_call_from_tree): Replace
+ stmt with a NOP instead of removing it.
+
+2012-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-10-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54976
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
+ Robustify against odd inner_mode inputs.
+
+ 2012-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54894
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
+ Handle over-aligned scalar types properly.
+
+ 2012-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54735
+ * tree-ssa-pre.c (do_pre): Make sure to update virtual SSA form before
+ cleaning up the CFG.
+
+2012-11-21 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2012-11-20 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.md (movdf_hardfloat32): Add a comment
+ explaining the register ordering preferences.
+
+ 2012-11-19 Michael Meissner <meissner@linux.vnet.ibm.com>
+ * config/rs6000/rs6000.md (movdf_hardfloat32): Reorder move
+ constraints so that the traditional floating point loads, stores,
+ and moves are done first, then the VSX loads, stores, and moves,
+ and finally the GPR loads, stores, and moves so that reload
+ chooses FPRs over GPRs, and uses the traditional load/store
+ instructions which provide an offset.
+ (movdf_hardfloat64): Likewise.
+
+2012-11-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backported from mainline
+ 2012-11-13 Eric Botcazou <ebotcazou@adacore.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/55142
+ * config/i386/i386.c (legitimize_pic_address): Properly handle
+ REG + CONST.
+ (ix86_print_operand_address): Set code to 'k' when forcing
+ addr32 prefix. For x32, zero-extend negative displacement if
+ it < -16*1024*1024.
+
+2012-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * common.opt (fvar-tracking-uninit): Document.
+ * toplev.c (process_options): Fix handling of flag_var_tracking_uninit.
+ * config/darwin.c (darwin_override_options): Likewise.
+
+2012-11-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/sparc/sparc.h (AS_NIAGARA3_FLAG): Tweak.
+ * config/sparc/sol2.h (TARGET_CPU_niagara4 support): Fix pasto.
+
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * doc/install.texi (sparc64-x-solaris2): Mention MPC as well.
+
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/i386/i386.c (release_scratch_register_on_entry): Also adjust
+ sp_offset manually.
+
+2012-11-07 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_init_machine_status): Do not
+ explicitly clear tls_descriptor_call_expanded_p again.
+
+ 2012-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md
+ (<avx_avx2>_maskstore<ssemodesuffix><avxsizesuffix>): Mark operand 0
+ as read and written by the instruction.
+
+ 2012-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (TARGET_INSTANTIATE_DECLS): New define.
+ (ix86_instantiate_decls): New function.
+ (ix86_expand_builtin) <case IX86_BUILTIN_LDMXCSR>: Use SLOT_TEMP
+ stack slot instead of SLOT_VIRTUAL.
+ <case IX86_BUILTIN_STMXCSR>: Ditto.
+ (assign_386_stack_local): Do not assert when virtual slot is valid.
+ * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_VIRTUAL.
+ * config/i386/i386.md (truncdfsf2): Do not use SLOT_VIRTUAL stack slot.
+ (truncxf<mode>2): Ditto.
+ (floatunssi<mode>2): Ditto.
+ (isinf<mode>2): Ditto.
+ * config/i386/sync.md (atomic_load<mode>): Ditto.
+ (atomic_store<mode>): Ditto.
+
+2012-11-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/55219
+ * fold-const.c (fold_binary_op_with_conditional_arg): Do not fold if
+ the argument is itself a conditional expression.
+
+2012-11-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (print_reg): Replace REX_INT_REG_P with
+ REX_INT_REGNO_P.
+
+2012-11-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR tree-optimization/54986
+ * gimple-fold.c (canonicalize_constructor_val): Strip again all no-op
+ conversions on entry but add them back on exit if needed.
+
+2012-11-05 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/55204
+ * config/i386/i386.c (ix86_address_subreg_operand): Remove stack
+ pointer check.
+ (print_reg): Use true_regnum rather than REGNO.
+ (ix86_print_operand_address): Remove SUBREG handling.
+
+2012-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2012-10-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54828
+ * gimple.h (is_gimple_sizepos): New inline function.
+ * gimplify.c (gimplify_one_sizepos): Use it. Remove useless
+ final assignment to expr variable.
+ * tree.c (RETURN_TRUE_IF_VAR): Return true also if
+ !TYPE_SIZES_GIMPLIFIED (type) and _t is going to be gimplified
+ into a local temporary.
+
+ 2012-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54877
+ * tree-vect-loop.c (vect_is_simple_reduction_1): For MINUS_EXPR
+ use make_ssa_name instead of copy_ssa_name.
+
+2012-11-03 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2012-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53708
+ * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve
+ user-supplied alignment when used with an explicit section name.
+
+2012-11-02 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/54985
+ * tree-ssa-threadedge.c (cond_arg_set_in_bb): New function extracted
+ from thread_across_edge.
+ (thread_across_edge): Use it in all cases where we might thread
+ across a back edge.
+
+2012-10-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/i386/i386.c (ix86_expand_prologue): Emit frame info for the
+ special register pushes before frame probing and allocation.
+
+2012-10-31 Ralf Corsépius <ralf.corsepius@rtems.org>,
+ Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config/sparc/t-rtems: New (Custom multilibs).
+ * config/sparc/t-rtems-64: New (Custom multilibs).
+ * config.gcc (sparc64-*-rtems*): Add sparc/t-rtems-64.
+ (sparc-*-rtems*): Add sparc/t-rtems.
+
+2012-10-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * cse.c (hash_rtx_cb): Replace RTX_UNCHANGING_P with MEM_READONLY_P in
+ head comment.
+ (hash_rtx): Likewise.
+
+2012-10-29 Terry Guo <terry.guo@arm.com>
+
+ Backport from mainline
+ 2012-10-11 Terry Guo <terry.guo@arm.com>
+
+ * config/arm/arm.c (arm_arch6m): New variable to denote armv6-m
+ architecture.
+ * config/arm/arm.h (TARGET_HAVE_DMB): The armv6-m also has DMB
+ instruction.
+
+2012-10-26 Gunther Nikl <gnikl@users.sourceforge.net>
+
+ * common/config/m68k/m68k-common.c (m68k_handle_option): Set
+ gcc_options fields of opts_set for -m68020-40 and -m68020-60.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/t-rtems: Revert previous commit.
+
+2012-10-26 Terry Guo <terry.guo@arm.com>
+
+ Backport from mainline
+ 2012-10-23 Terry Guo <terry.guo@arm.com>
+
+ PR target/55019
+ * config/arm/arm.c (thumb1_expand_prologue): Don't push high regs with
+ live argument regs.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
+ __USE_INIT_FINI__.
+ * config/avr/t-rtems (LIB1ASMFUNCS): Filter out _exit.
+
+2012-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (microblaze*-*-rtems*): New target.
+ * config/microblaze/rtems.h: New.
+ * config/microblaze/t-rtems: New.
+
+2012-10-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54902
+ * tree-ssa-pre.c (fini_pre): Return TODO.
+ (execute_pre): Adjust.
+ * tree-ssa-tailmerge.c (tail_merge_optimize): Delete unreachable
+ blocks before computing dominators.
+
+2012-10-24 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-10-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (memory_address_length): Assert that non-null
+ base or index RTXes are registers. Do not check for REG RTXes.
+ Determine addr32 prefix using SImode_address_operand or
+ from original base and index RTXes. Simplify code.
+
+ 2012-10-21 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386-protos.h (memory_address_length): Add new bool
+ argument. Update all uses.
+ * config/i386/i386.c (memory_address_length): If not LEA insn, then
+ add length of addr32 prefix based on mode of base or index register.
+ (ix86_attr_length_address_default) <TYPE_LEA>: Do not handle SImode
+ addresses here. Update call to memory_address_length.
+ (ix86_print_address_operand): Use SImode_address_operand predicate.
+ * config/i386/predicates.md (SImode_address_operand): New.
+ * config/i386/i386.md (lea<mode>): Use SImode_address_operand
+ to calculate "mode" attribute. Use SImode_address_operand predicate
+ instead of open-coding accepted RTX codes.
+
+2012-10-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2012-10-22 trunk r192685.
+ * doc/invoke.texi (AVR Options): Document __AVR_ARCH__.
+ Note __AVR_<device>__ is not defined for cores.
+ Don't point to --help=target.
+ Order --mcu= documentation according to trunk:/gcc/doc/avr-mmcu.texi.
+
+2012-10-19 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2012-10-19 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/54945
+ * fold-const.c (fold_sign_changed_comparison): Punt if folding
+ pointer/non-pointer comparison.
+
+2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ Backported from mainline
+ 2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ PR target/54892
+ * config/arm/arm.c (arm_expand_compare_and_swap): Use SImode to make
+ sure the mode is correct when falling through from above cases.
+
+2012-10-19 Alan Modra <amodra@gmail.com>
+
+ * configure.ac (HAVE_LD_NO_DOT_SYMS): Set if using gold.
+ (HAVE_LD_LARGE_TOC): Likewise.
+ * configure: Regenerate.
+
+2012-10-19 Alan Modra <amodra@gmail.com>
+
+ * config/rs6000/predicates.md (splat_input_operand): Don't call
+ input_operand for MEMs. Instead check for volatile and call
+ memory_address_addr_space_p with modified mode.
+
+2012-10-17 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
+
+ Backported from mainline
+ 2012-07-23 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * config/arm/arm.c (arm_reorg): Ensure all insns are split.
+
+2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/54870
+ * tree.h (TREE_ADDRESSABLE): Document special usage on SSA_NAME.
+ * cfgexpand.c (update_alias_info_with_stack_vars ): Set it on the
+ SSA_NAME pointer that points to a partition if there is at least
+ one variable with it set in the partition.
+ * dse.c (local_variable_can_escape): New predicate.
+ (can_escape): Call it.
+ * gimplify.c (mark_addressable): If this is a partitioned decl, also
+ mark the SSA_NAME pointer that points to a partition.
+
+2012-10-16 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2012-08-09 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/53701
+ * sel-sched.c (vinsn_vec_has_expr_p): Clarify function comment.
+ rocess not only expr's vinsns but all old vinsns from expr's
+ istory of changes.
+
+2012-10-16 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2012-07-31 Andrey Belevantsev <abel@ispras.ru>
+ PR target/53975
+
+ * sel-sched-ir.c (has_dependence_note_reg_use): Clarify comment.
+ Revert
+ 2011-08-04 Sergey Grechanik <mouseentity@ispras.ru>
+ * sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge
+ only if producer writes to the register given by regno.
+
+2012-09-15 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (UNSPEC_MOVU): Remove.
+ (UNSPEC_LOADU): New.
+ (UNSPEC_STOREU): Ditto.
+ (<sse>_movu<ssemodesuffix><avxsizesuffix>): Split to ...
+ (<sse>_loadu<ssemodesuffix><avxsizesuffix>): ... this and ...
+ (<sse>_storeu<ssemodesuffix><avxsizesuffix>) ... this.
+ (<sse2>_movdqu<avxsizesuffix>): Split to ...
+ (<sse2>_loaddqu<avxsizesuffix>): ... this and ...
+ (<sse2>_storedqu<avxsizesuffix>): ... this.
+ (*sse4_2_pcmpestr_unaligned): Update.
+ (*sse4_2_pcmpistr_unaligned): Ditto.
+
+ * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): Use
+ gen_avx_load{dqu,ups,upd}256 to load from unaligned memory and
+ gen_avx_store{dqu,ups,upd}256 to store to unaligned memory.
+ (ix86_expand_vector_move_misalign): Use gen_sse_loadups or
+ gen_sse2_load{dqu,upd} to load from unaligned memory and
+ gen_sse_loadups or gen_sse2_store{dqu,upd}256 to store to
+ unaligned memory.
+ (struct builtin_description bdesc_spec) <IX86_BUILTIN_LOADUPS>:
+ Use CODE_FOR_sse_loadups.
+ <IX86_BUILTIN_LOADUPD>: Use CODE_FOR_sse2_loadupd.
+ <IX86_BUILTIN_LOADDQU>: Use CODE_FOR_sse2_loaddqu.
+ <IX86_BUILTIN_STOREUPS>: Use CODE_FOR_sse_storeups.
+ <IX86_BUILTIN_STOREUPD>: Use CODE_FOR_sse2_storeupd.
+ <IX86_BUILTIN_STOREDQU>: Use CODE_FOR_sse2_storedqu.
+ <IX86_BUILTIN_LOADUPS256>: Use CODE_FOR_avx_loadups256.
+ <IX86_BUILTIN_LOADUPD256>: Use CODE_FOR_avx_loadupd256.
+ <IX86_BUILTIN_LOADDQU256>: Use CODE_FOR_avx_loaddqu256.
+ <IX86_BUILTIN_STOREUPS256>: Use CODE_FOR_avx_storeups256.
+ <IX86_BUILTIN_STOREUPD256>: Use CODE_FOR_avx_storeupd256.
+ <IX86_BUILTIN_STOREDQU256>: Use CODE_FOR_avx_storedqu256.
+
+2012-10-15 Steven Bosscher <steven@gcc.gnu.org>
+
+ Backport from trunk (r190222):
+
+ PR tree-optimization/54146
+ * ifcvt.c: Include pointer-set.h.
+ (cond_move_process_if_block): Change type of then_regs and
+ else_regs from alloca'd array to pointer_sets.
+ (check_cond_move_block): Update for this change.
+ (cond_move_convert_if_block): Likewise.
+ * Makefile.in: Fix dependencies for ifcvt.o.
+
+2012-10-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54920
+ * tree-ssa-pre.c (create_expression_by_pieces): Properly
+ allocate temporary storage for all NARY elements.
+
+2012-10-08 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/54854
+ * doc/invoke.texi (AVR Options): Deprecate -mshort-calls.
+
2012-10-05 Mark Kettenis <kettenis@openbsd.org>
* config.gcc (*-*-openbsd4.[3-9]|*-*-openbsd[5-9]*): Set
default_use_cxa_atexit to yes.
-
+
2012-10-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/pa/pa.md: Adjust unamed HImode add insn pattern.
@@ -19,7 +520,7 @@
Backported from mainline
2012-10-03 Andrew W. Nosenko <andrew.w.nosenko@gmail.com>
- * config/i386/driver-i386.c (host_detect_local_cpu): Fix logic
+ * config/i386/driver-i386.c (host_detect_local_cpu): Fix logic
in SSE and YMM state support check for -march=native.
2012-10-03 Alexandre Oliva <aoliva@redhat.com>
@@ -84,8 +585,7 @@
PR target/54703
* simplify-rtx.c (simplify_binary_operation_1): Perform
- (x - (x & y)) -> (x & ~y) optimization only for integral
- modes.
+ (x - (x & y)) -> (x & ~y) optimization only for integral modes.
2012-09-24 Eric Botcazou <ebotcazou@adacore.com>
@@ -163,12 +663,12 @@
Backport from mainline
2012-09-07 Andi Kleen <ak@linux.intel.com>
- * gcc/lto-streamer.h (res_pair): Add.
- (lto_file_decl_data): Replace resolutions with respairs.
- Add max_index.
- * gcc/lto/lto.c (lto_resolution_read): Remove max_index. Add rp.
- Initialize respairs.
- (lto_file_finalize): Set up resolutions vector lazily from respairs.
+ * gcc/lto-streamer.h (res_pair): Add.
+ (lto_file_decl_data): Replace resolutions with respairs.
+ Add max_index.
+ * gcc/lto/lto.c (lto_resolution_read): Remove max_index. Add rp.
+ Initialize respairs.
+ (lto_file_finalize): Set up resolutions vector lazily from respairs.
2012-09-14 Walter Lee <walt@tilera.com>
@@ -234,7 +734,7 @@
2012-09-12 Christian Bruel <christian.bruel@st.com>
- * config/sh/newlib.h (NO_IMPLICIT_EXTERN_C): Define.
+ * config/sh/newlib.h (NO_IMPLICIT_EXTERN_C): Define.
2012-09-12 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/ChangeLog.google-4_7 b/gcc/ChangeLog.google-4_7
new file mode 100644
index 00000000000..ead1d5ca8dc
--- /dev/null
+++ b/gcc/ChangeLog.google-4_7
@@ -0,0 +1,1712 @@
+2010-12-01 Xinliang David Li <davidxl@google.com>
+
+ Backport r194038 from trunk
+
+ * config/i386/i386.c: Allow sign extend instructions (cltd etc)
+ on modern CPUs.
+
+2012-12-01 Dehao Chen <dehao@dehao.com>
+
+ * cgraphbuild.c (build_cgraph_edges): Handle AutoFDO profile.
+ (rebuild_cgraph_edges): Likewise.
+ * cgraph.c (cgraph_clone_node): Likewise.
+ (clone_function_name): Likewise.
+ * cgraph.h (cgraph_node): New field.
+ * tree-pass.h (pass_ipa_auto_profile): New pass.
+ * cfghooks.c (make_forwarder_block): Handle AutoFDO profile.
+ * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
+ * toplev.c (compile_file): Likewise.
+ (process_options): Likewise.
+ * debug.h (auto_profile_debug_hooks): New.
+ * cgraphunit.c (cgraph_finalize_compilation_unit): Handle AutoFDO
+ profile.
+ (cgraph_copy_node_for_versioning): Likewise.
+ * regs.h (REG_FREQ_FROM_BB): Likewise.
+ * gcov-io.h: (GCOV_TAG_AFDO_FILE_NAMES): New.
+ (GCOV_TAG_AFDO_FUNCTION): New.
+ (GCOV_TAG_AFDO_MODULE_GROUPING): New.
+ * ira-int.h (REG_FREQ_FROM_EDGE_FREQ): Handle AutoFDO profile.
+ * ipa-inline.c (edge_hot_enough_p): Likewise.
+ (edge_badness): Likewise.
+ (inline_small_functions): Likewise.
+ * dwarf2out.c (auto_profile_debug_hooks): New.
+ * opts.c (common_handle_option): Handle AutoFDO profile.
+ * timevar.def (TV_IPA_AUTOFDO): New.
+ * predict.c (compute_function_frequency): Handle AutoFDO profile.
+ (rebuild_frequencies): Handle AutoFDO profile.
+ * auto-profile.c (struct gcov_callsite_pos): New.
+ (struct gcov_callsite): New.
+ (struct gcov_stack): New.
+ (struct gcov_function): New.
+ (struct afdo_bfd_name): New.
+ (struct afdo_module): New.
+ (afdo_get_filename): New.
+ (afdo_get_original_name_size): New.
+ (afdo_get_bfd_name): New.
+ (afdo_read_bfd_names): New.
+ (afdo_stack_hash): New.
+ (afdo_stack_eq): New.
+ (afdo_function_hash): New.
+ (afdo_function_eq): New.
+ (afdo_bfd_name_hash): New.
+ (afdo_bfd_name_eq): New.
+ (afdo_bfd_name_del): New.
+ (afdo_module_hash): New.
+ (afdo_module_eq): New.
+ (afdo_module_num_strings): New.
+ (afdo_add_module): New.
+ (read_aux_modules): New.
+ (get_inline_stack_size_by_stmt): New.
+ (get_inline_stack_size_by_edge): New.
+ (get_function_name_from_block): New.
+ (get_inline_stack_by_stmt): New.
+ (get_inline_stack_by_edge): New.
+ (afdo_get_function_count): New.
+ (afdo_set_current_function_count): New.
+ (afdo_add_bfd_name_mapping): New.
+ (afdo_add_copy_scale): New.
+ (get_stack_count): New.
+ (get_stmt_count): New.
+ (afdo_get_callsite_count): New.
+ (afdo_get_bb_count): New.
+ (afdo_annotate_cfg): New.
+ (read_profile): New.
+ (process_auto_profile): New.
+ (init_auto_profile): New.
+ (end_auto_profile): New.
+ (afdo_find_equiv_class): New.
+ (afdo_propagate_single_edge): New.
+ (afdo_propagate_multi_edge): New.
+ (afdo_propagate_circuit): New.
+ (afdo_propagate): New.
+ (afdo_calculate_branch_prob): New.
+ (auto_profile): New.
+ (gate_auto_profile_ipa): New.
+ (struct simple_ipa_opt_pass): New.
+ * auto-profile.h (init_auto_profile): New.
+ (end_auto_profile): New.
+ (process_auto_profile): New.
+ (afdo_set_current_function_count): New.
+ (afdo_add_bfd_name_mapping): New.
+ (afdo_add_copy_scale): New.
+ (afdo_calculate_branch_prob): New.
+ (afdo_get_callsite_count): New.
+ (afdo_get_bb_count): New.
+ * profile.c (compute_branch_probabilities): Handle AutoFDO profile.
+ (branch_prob): Likeise.
+ * loop-unroll.c (decide_unroll_runtime_iterations): Likewise.
+ * coverage.c (coverage_init): Likewise.
+ * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
+ * common.opt (fauto-profile): New.
+ * tree-inline.c (copy_bb): Handle AutoFDO profile.
+ (copy_edges_for_bb): Likewise.
+ (copy_cfg_body): Likewise.
+ * tree-profile.c (direct_call_profiling): Likewise.
+ (gate_tree_profile_ipa): Likewise.
+ * basic-block.h (EDGE_ANNOTATED): New field.
+ (BB_ANNOTATED): New field.
+ * tree-cfg.c (gimple_merge_blocks): Handle AutoFDO profile.
+ * passes.c (init_optimization_passes): Handle AutoFDO profile.
+
+2012-11-27 Dehao Chen <dehao@google.com>
+
+ Backport 193857 from trunk:
+
+ 2012-11-27 Dehao Chen <dehao@google.com>
+
+ * ipa-prop.c (ipa_modify_call_arguments): Set loc correctly.
+ * cfglayout.c (last_location): Remove unused variable.
+
+2012-11-27 Dehao Chen <dehao@google.com>
+
+ Backport 193852 from trunk:
+
+ 2012-11-27 Dehao Chen <dehao@google.com>
+
+ * cfgrtl.c (rtl_merge_blocks): Check with UNKNOWN_LOCATION
+ correctly.
+ (cfg_layout_merge_blocks): Likewise.
+
+2012-11-26 Easwaran Raman <eraman@google.com>
+
+ Backport 193554 from trunk:
+
+ 2012-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.md (mov<mode>cc): Use comparison_operator
+ instead of ordered_comparison_operator resp.
+ ix86_fp_comparison_operator predicates.
+ * config/i386/i386.c (ix86_expand_fp_movcc): Reject TImode
+ or for -m32 DImode comparisons.
+
+2012-11-26 Diego Novillo <dnovillo@google.com>
+
+ Backport from gcc-4_7-branch r193816.
+
+ 2012-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-10-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54976
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
+ Robustify against odd inner_mode inputs.
+
+ 2012-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54894
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
+ Handle over-aligned scalar types properly.
+
+ 2012-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54735
+ * tree-ssa-pre.c (do_pre): Make sure to update
+ virtual SSA form before cleaning up the CFG.
+
+2012-11-12 Rong Xu <xur@google.com>
+
+ * coverage.c (build_info): Fix computation of &.MODINFO.
+
+2012-11-09 Harshit Chopra <harshit@google.com>
+
+ Backport 193381 from google/main.
+
+ * gcc/c-family/c-common.c (handle_always_patch_for_instrumentation_attribute):
+ Handle always_patch_for_instrumentation attribute and turn inlining off for
+ the function.
+ (handle_never_patch_for_instrumentation_attribute): Handle
+ never_patch_for_instrumentation attribute of a function.
+ * gcc/config/i386/i386.c (has_attribute): Checks the presence of an
+ attribute.
+ (check_should_patch_current_function): Takes into account
+ always_patch_for_instrumentation or never_patch_for_instrumentation attribute
+ when deciding that a function should be patched.
+ * gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c (int main):
+ Test case to test for never_patch_for_instrumentation attribute.
+ * gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c: Test
+ case to test for always_patch_for_instrumentation attribute.
+
+2012-11-05 Dehao Chen <dehao@google.com>
+
+ Backport 193169, 193137 and 193053 from trunk:
+
+ * tree-eh.c (do_return_redirection): Set location for jump statement.
+ (do_goto_redirection): Likewise.
+ (frob_into_branch_around): Likewise.
+ (lower_try_finally_nofallthru): Likewise.
+ (lower_try_finally_copy): Likewise.
+ (lower_try_finally_switch): Likewise.
+ * expr.c (store_expr): Use current insn location instead of expr
+ location.
+ (expand_expr_real): Likewise.
+ (expand_expr_real_1): Likewise.
+ * cfglayout.c (reemit_insn_block_notes): Do not change scope if insn
+ location is UNKNOWN_LOCATION.
+
+2012-11-01 Easwaran Raman <eraman@google.com>
+
+ Backport 191302 and 192651 from trunk:
+
+ 2012-09-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/44194
+ * calls.c (expand_call): In the PARALLEL case, copy the return value
+ into pseudos instead of spilling it onto the stack.
+ * emit-rtl.c (adjust_address_1): Rename ADJUST into ADJUST_ADDRESS and
+ add new ADJUST_OBJECT parameter.
+ If ADJUST_OBJECT is set, drop the underlying object if it cannot be
+ proved that the adjusted memory access is still within its bounds.
+ (adjust_automodify_address_1): Adjust call to adjust_address_1.
+ (widen_memory_access): Likewise.
+ * expmed.c (store_bit_field_1): Call adjust_bitfield_address instead
+ of adjust_address. Do not drop the underlying object of a MEM.
+ (store_fixed_bit_field): Likewise.
+ (extract_bit_field_1): Likewise. Fix oversight in recursion.
+ (extract_fixed_bit_field): Likewise.
+ * expr.h (adjust_address_1): Adjust prototype.
+ (adjust_address): Adjust call to adjust_address_1.
+ (adjust_address_nv): Likewise.
+ (adjust_bitfield_address): New macro.
+ (adjust_bitfield_address_nv): Likewise.
+ * expr.c (expand_assignment): Handle a PARALLEL in more cases.
+ (store_expr): Likewise.
+ (store_field): Likewise.
+
+ * dse.c: Fix typos in the head comment.
+ 2012-10-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/44194
+ * calls.c (expand_call): Allow sibling calls in the PARALLEL case.
+
+2012-10-25 Dehao Chen <dehao@google.com>
+
+ Backport r191810 from trunk.
+
+ * cfglayout.c (fixup_reorder_chain): Compare locus against
+ UNKNOWN_LOCATION.
+
+2012-10-20 Xinliang David Li <davidxl@google.com>
+
+ * dwarf2out.c: change functdef etc to be long time.
+ * function.h: Make FUNC_LABEL_ID 64 bit if possible.
+
+2012-10-19 Easwaran Raman <eraman@google.com>
+
+ * tree-ssa-reassoc.c (assign_uids): New function.
+ (assign_uids_in_relevant_bbs): Likewise.
+ (ensure_ops_are_available): Likewise.
+ (rewrite_expr_tree): Do not move statements beyond what is
+ necessary.Remove call to swap_ops_for_binary_stmt...
+ (reassociate_bb): ... and move it here.
+
+2012-10-19 Xinliang David Li <davidxl@google.com>
+
+ * dwarf2out.c (get_subprogram_die): Use FUNC_LABEL_ID instead
+ of current_function_funcdef_no to synthysize label name.
+
+2012-10-19 Teresa Johnson <tejohnson@google.com>
+
+ Backport r192624 from google/main.
+
+ 2012-10-19 Teresa Johnson <tejohnson@google.com>
+
+ * ree.c (add_removable_extension): Remove unnecessary
+ mode check with other extension.
+ * testsuite/gcc.c-torture/execute/20111227-2.c: New test.
+ * testsuite/gcc.c-torture/execute/20111227-3.c: Ditto.
+
+2012-10-18 Easwaran Raman <eraman@google.com>
+
+ Backport r183817 from google/gcc-4_6 branch.
+
+ 2012-02-01 Easwaran Raman <eraman@google.com>
+
+ * expr.c (do_tablejump): Add default_probability as the
+ sixth parameter and use it to generate REG_BR_PROB note.
+ (try_tablejump): Add default_probability as a parameter.
+ * cfgbuild.c (non_zero_profile_counts): New function.
+ (compute_outgoing_frequencies): If edges have profile counts
+ set, don't replace them with guessed values.
+ * expr.h (try_tablejump): Add additional parameter to the
+ declaration.
+ * stmt.c (tree-flow.h): Include.
+ (case_node): Add new fields count and subtree_count.
+ (add_case_node): Pass count as a paramater and initialize
+ count field of case_node.
+ (case_probability): New macro.
+ (expand_case): Propagate profile information from the tree
+ level to RTL during switch case expansion.
+ (balance_case_nodes): Compute subtree_count for case nodes.
+ (emit_case_nodes): Set branch probabilities for generated
+ branches.
+
+2012-10-16 DeLesley Hutchins <delesley@google.com>
+
+ common.opt:
+ Add clang thread safety warning flags as supported, but ignored.
+ (-Wthread-safety-analysis/attributes/precise)
+
+2012-10-10 Dehao Chen <dehao@google.com>
+
+ Backport 192285 from trunk:
+
+ 2012-10-10 Dehao Chen <dehao@google.com>
+
+ * tree-eh.c (lower_try_finally_onedest): Set correct location for
+ deallocator.
+ * gimplify.c (gimplify_expr): Set correct location for TRY stmt.
+
+2012-10-10 Diego Novillo <dnovillo@google.com>
+
+ Merge from gcc-4_7-branch rev 192176.
+
+ Rollback revisions 190375 and 190601 (TM backports).
+
+2012-10-09 Harshit Chopra <harshit@google.com>
+
+ Backport 192231 from google/main:
+
+ 2012-09-28 Harshit Chopra <harshit@google.com>
+
+ * gcc/config/i386/i386.c (ix86_output_function_nops_prologue_epilogue):
+ Emit relative address to function patch sections.
+
+2012-10-09 Rong Xu <xur@google.com>
+
+ Google Ref: b/7049102.
+ * gcc.dg/tree-ssa/vrp1.c: New testcase.
+
+2012-10-09 Rong Xu <xur@google.com>
+
+ Google Ref: b/7049102.
+ Backport r190291 from trunk.
+
+ 2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54109
+ * tree-ssa-forwprop.c
+ (forward_propagate_addr_into_variable_array_index): Remove.
+ (forward_propagate_addr_expr_1): Adjust.
+
+ * gcc.dg/torture/pr54109.c: New testcase.
+ * gcc.dg/tree-ssa/forwprop-1.c: Adjust.
+ * gcc.dg/tree-ssa/forwprop-2.c: Likewise.
+
+2012-10-08 Dehao Chen <dehao@google.com>
+
+ Backport 191931, 192049, 192120, 192165 from trunk.
+
+ * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): Use
+ LOCATION_LOCUS to compare with UNKNOWN_LOCATION.
+ (slpeel_tree_peel_loop_to_edge): Likewise.
+ * tree-vectorizer.c (vectorize_loops): Likewise.
+ * tree-cfg.c (move_block_to_fn): Update lexical block for phi_args.
+ * tree-ssa-live.c (clear_unused_block_pointer_1): Look at
+ DECL_DEBUG_EXPR again.
+ * gimple-low.c (lower_stmt): Set the block for call args.
+
+2012-10-08 Dehao Chen <dehao@google.com>
+
+ Backport 192215 from trunk:
+
+ 2012-10-08 Dehao Chen <dehao@google.com>
+
+ * predict.c (predict_extra_loop_exits): Use
+ predict_paths_leading_to_edge to replace predict_edge_def.
+
+2012-10-01 Teresa Johnson <tejohnson@google.com>
+
+ Backport 191932 from google/main:
+
+ Add a new dump flag that dumps PMU profile information using the -pmu
+ dump option.
+
+ 2012-10-01 Teresa Johnson <tejohnson@google.com>
+ Chris Manghane <cmang@google.com>
+
+ * doc/invoke.texi: Update -fpmu-profile-use option.
+ * tree-dump.c: Add new dump flag.
+ * tree-pretty-print.c (dump_load_latency_details): New function.
+ (dump_pmu): Ditto.
+ (dump_generic_node): Add support for new dump flag.
+ * tree-pretty-print.h (dump_pmu): Declare.
+ * tree-pass.h (enum tree_dump_index): Add new dump flag.
+ * gcov.c (process_pmu_profile): Fix string table count assert.
+ * opts.c (OPT_fpmu_profile_use_): Add support for -fpmu-profile-use.
+ * gimple-pretty-print.c (dump_gimple_phi): Add support for new dump
+ flag.
+ (dump_gimple_stmt): Ditto.
+ * coverage.c (struct pmu_entry): New structure.
+ (struct gcov_pmu_summary): Ditto.
+ (htab_pmu_entry_hash): New function.
+ (htab_pmu_entry_eq): Ditto.
+ (htab_pmu_entry_del): Ditto.
+ (read_pmu_file): Ditto.
+ (get_pmu_hash_entry): Ditto.
+ (process_pmu_data): Ditto.
+ (get_coverage_pmu_latency): Ditto.
+ (get_coverage_pmu_branch_mispredict): Ditto.
+ (pmu_data_present): Ditto.
+ (coverage_init): Add pmu file read support.
+ * coverage.h (get_coverage_pmu_latency): Declare.
+ (get_coverage_pmu_branch_mispredict): Ditto.
+ * common.opt: Update -fpmu-profile-use option.
+
+2012-09-28 Rong Xu <xur@google.com>
+
+ Google Ref: b/7005205
+ * gcc/coverage.c (coverage_checksum_string): strip out LIPO
+ specific string.
+ (crc32_string_1): New function.
+ * gcc/cp/decl2.c (start_static_storage_duration_function):
+ generate LIPO specific string.
+
+2012-09-27 Dehao Chen <dehao@google.com>
+
+ Backport from trunk r191494, r191510, r191614, r191669, r191680,
+ r191706, r191747, r191759, r191779 and r191810:
+
+ * toplev.c (toplev_main): Finalize block_locations.
+ * tree.c (tree_set_block): New.
+ (tree_block): Change to use LOCATION_BLOCK.
+ (build1_stat): Remove block.
+ * tree.h (TREE_SET_BLOCK): New.
+ (tree_set_block): New.
+ (tree_block): Change to return tree.
+ (TREE_BLOCK): Likewise.
+ (tree_exp): Remove block.
+ (DECL_IS_BUILTIN): Compare LOCATION_LOCUS.
+ (EXPR_HAS_LOCATION): Likewise.
+ (inlined_function_outer_scope_p): Likewise.
+ (OMP_CLAUSE_HAS_LOCATION): Likewise.
+ * cfglayout.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK.
+ (fixup_reorder_chain): Likewise.
+ (insn_discriminator): Likewise.
+ (insn_locators_alloc): Remove.
+ (insn_locators_finalize): Remove.
+ (insn_locators_free): Remove.
+ (set_curr_insn_source_location): Remove.
+ (get_curr_insn_source_location): Remove.
+ (set_curr_insn_block): Remove.
+ (get_curr_insn_block): Remove.
+ (locator_scope): Remove.
+ (insn_scope): Change to use new location.
+ (locator_location): Remove.
+ (insn_line): Change to use new location.
+ (locator_file): Remove.
+ (insn_file): Change to use new location.
+ (locator_eq): Remove.
+ (insn_locations_init): New.
+ (insn_locations_finalize): New.
+ (set_curr_insn_location): New.
+ (curr_insn_location): New.
+ * final.c (final_start_function): Likewise.
+ * input.c (expand_location): Likewise.
+ (location_with_discriminator): Likewise.
+ (has_discriminator): Likewise.
+ (map_discriminator_location): Likewise.
+ (get_discriminator_from_locus): Likewise.
+ * input.h (LOCATION_LOCUS): New.
+ (LOCATION_BLOCK): New.
+ * fold-const.c (expr_location_or): Change to use new location.
+ * reorg.c (emit_delay_sequence): Likewise.
+ (dbr_schedule): Likewise.
+ * modulo-sched.c (loop_single_full_bb_p): Likewise.
+ (dump_insn_location): Likewise.
+ (loop_canon_p): Likewise.
+ (sms_schedule): Likewise.
+ * lto-streamer-out.c (lto_output_location_bitpack): Likewise.
+ * lto-cgraph.c (output_node_opt_summary): Likewise.
+ * jump.c (rtx_renumbered_equal_p): Likewise.
+ * ifcvt.c (noce_try_move): Likewise.
+ (noce_try_store_flag): Likewise.
+ (noce_try_store_flag_constants): Likewise.
+ (noce_try_addcc): Likewise.
+ (noce_try_store_flag_mask): Likewise.
+ (noce_try_cmove): Likewise.
+ (noce_try_cmove_arith): Likewise.
+ (noce_try_minmax): Likewise.
+ (noce_try_abs): Likewise.
+ (noce_try_sign_mask): Likewise.
+ (noce_try_bitop): Likewise.
+ (noce_process_if_block): Likewise.
+ (cond_move_process_if_block): Likewise.
+ (find_cond_trap): Likewise.
+ * ipa-prop.c (ipa_set_jf_constant): Likewise.
+ (ipa_write_jump_function): Likewise.
+ * dwarf2out.c (add_src_coords_attributes): Likewise.
+ * expr.c (expand_expr_real): Likewise.
+ * tree-parloops.c (create_loop_fn): Likewise.
+ * recog.c (peep2_attempt): Likewise.
+ * function.c (free_after_compilation): Likewise.
+ (expand_function_end): Likewise.
+ (maybe_copy_prologue_epilogue_insn): Likewise.
+ (set_insn_locations): Likewise.
+ (thread_prologue_and_epilogue_insns): Likewise.
+ * print-rtl.c (print_rtx): Likewise.
+ * profile.c (branch_prob): Likewise.
+ * trans-mem.c (ipa_tm_scan_irr_block): Likewise.
+ * gimplify.c (gimplify_call_expr): Likewise.
+ * except.c (duplicate_eh_regions_1): Likewise.
+ * emit-rtl.c (try_split): Likewise.
+ (make_insn_raw): Likewise.
+ (make_debug_insn_raw): Likewise.
+ (make_jump_insn_raw): Likewise.
+ (make_call_insn_raw): Likewise.
+ (emit_pattern_after_setloc): Likewise.
+ (emit_pattern_after): Likewise.
+ (emit_insn_after_setloc): Likewise.
+ (emit_insn_after): Likewise.
+ (emit_jump_insn_after_setloc): Likewise.
+ (emit_jump_insn_after): Likewise.
+ (emit_call_insn_after_setloc): Likewise.
+ (emit_call_insn_after): Likewise.
+ (emit_debug_insn_after_setloc): Likewise.
+ (emit_debug_insn_after): Likewise.
+ (emit_pattern_before_setloc): Likewise.
+ (emit_pattern_before): Likewise.
+ (emit_insn_before_setloc): Likewise.
+ (emit_insn_before): Likewise.
+ (emit_jump_insn_before_setloc): Likewise.
+ (emit_jump_insn_before): Likewise.
+ (emit_call_insn_before_setloc): Likewise.
+ (emit_call_insn_before): Likewise.
+ (emit_debug_insn_before_setloc): Likewise.
+ (emit_debug_insn_before): Likewise.
+ (emit_copy_of_insn_after): Likewise.
+ * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location.
+ (expand_gimple_cond): Likewise.
+ (expand_call_stmt): Likewise.
+ (expand_gimple_stmt_1): Likewise.
+ (expand_gimple_basic_block): Likewise.
+ (construct_exit_block): Likewise.
+ (gimple_expand_cfg): Likewise.
+ * cfgcleanup.c (try_forward_edges): Likewise.
+ * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
+ (dump_scope_block): Likewise.
+ (mark_all_vars_used): Likewise.
+ (remove_unused_locals): Likewise.
+ (clear_unused_block_pointer): New.
+ (clear_unused_block_pointer_1): New.
+ * rtl.c (rtx_equal_p_cb): Likewise.
+ (rtx_equal_p): Likewise.
+ * rtl.h (XUINT): New.
+ (INSN_LOCATOR): Remove.
+ (CURR_INSN_LOCATION): Remove.
+ (INSN_LOCATION): New.
+ (INSN_HAS_LOCATION): New.
+ * tree-inline.c (remap_gimple_op_r): Change to use new location.
+ (copy_tree_body_r): Likewise.
+ (copy_phis_for_bb): Likewise.
+ (expand_call_inline): Likewise.
+ * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise.
+ * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
+ * gimple-streamer-out.c (output_gimple_stmt): Likewise.
+ * combine.c (try_combine): Likewise.
+ * tree-outof-ssa.c (set_location_for_edge): Likewise.
+ (insert_partition_copy_on_edge): Likewise.
+ (insert_value_copy_on_edge): Likewise.
+ (insert_rtx_to_part_on_edge): Likewise.
+ (insert_part_to_rtx_on_edge): Likewise.
+ * basic-block.h (edge_def): Remove field.
+ * gimple.h (gimple_statement_base): Remove field.
+ (gimple_bb): Change to use new location.
+ (gimple_block): Likewise.
+ (gimple_set_block): Likewise.
+ (gimple_set_location): Likewise.
+ (gimple_has_location): Likewise.
+ * tree-cfg.c (make_cond_expr_edges): Likewise.
+ (make_goto_expr_edges): Likewise.
+ (gimple_can_merge_blocks_p): Likewise.
+ (assign_discriminator): Likewise.
+ (move_stmt_op): Likewise.
+ (move_block_to_fn): Likewise.
+ * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
+ * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
+ * config/i386/i386.c (x86_output_mi_thunk): Likewise.
+ * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
+ * config/sh/sh.c (sh_output_mi_thunk): Likewise.
+ (gen_block_redirect): Likewise.
+ * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
+ * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
+ (rs6000_final_prescan_insn): Likewise.
+ * config/score/score.c (score_output_mi_thunk): Likewise.
+ * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
+ * config/mips/mips.c (mips_output_mi_thunk): Likewise.
+ (mips16_gp_pseudo_reg): Likewise.
+ * config/s390/s390.c (s390_chunkify_start): Likewise.
+ * config/spu/spu.c (emit_nop_for_insn): Likewise.
+ (pad_bb): Likewise.
+ (spu_emit_branch_hint): Likewise.
+ (insert_hbrp_for_ilb_runout): Likewise.
+ * config/mep/mep.c (mep_make_bundle): Likewise.
+ (mep_bundle_insns): Likewise.
+ * config/c6x/c6x.c (gen_one_bundle): Likewise.
+ * config/picochip/picochip.c (picochip_reorg): Likewise.
+ * config/arm/arm.c (require_pic_register): Likewise.
+ * config/bfin/bfin.c (gen_one_bundle): Likewise.
+ * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
+ (cfg_layout_merge_blocks): Likewise.
+ * stmt.c (emit_case_nodes): Likewise.
+ * tree-eh.c (lower_try_finally_dup_block): Likewise.
+ (honor_protect_cleanup_actions): Likewise.
+
+2012-09-24 Xinliang David Li <davidxl@google.com>
+
+ * varasm.c (finish_alias_1): Fix mis-fired error
+ for extern alias (same-body) in LIPO mode.
+
+2012-09-24 Xinliang David Li <davidxl@google.com>
+
+ * df-problems.c (df_check_ud_du_memory_usage): New function.
+ * ree.c (rest_of_handle_ree): Suppress ree if it requires
+ too much memory.
+ * dce.c (rest_of_handle_ud_dce): Ditto.
+
+2012-09-24 Rong Xu <xur@google.com>
+
+ Google Ref: b/7210837 and b/7210303.
+ * coverage.c (force_matching_cg_opts): add new entries.
+
+2012-09-24 Rong Xu <xur@google.com>
+
+ Google ref b/7078882.
+ * l-ipo.c (cgraph_is_aux_decl_external): output comdat
+ virtual functions when they are auxiliary modules; otherwise
+ we may get undefined symbol in linking.
+
+2012-09-14 Dehao Chen <dehao@google.com>
+
+ Backport r191338 from trunk.
+
+ 2012-09-14 Dehao Chen <dehao@google.com>
+
+ * tree-eh.c (goto_queue_node): New field.
+ (record_in_goto_queue): New parameter.
+ (record_in_goto_queue_label): New parameter.
+ (lower_try_finally_dup_block): New parameter.
+ (maybe_record_in_goto_queue): Update source location.
+ (lower_try_finally_copy): Likewise.
+ (honor_protect_cleanup_actions): Likewise.
+ * gimplify.c (gimplify_expr): Reset the location to unknown.
+
+2012-09-14 Teresa Johnson <tejohnson@google.com>
+
+ Backport from trunk r190952 and r191238:
+
+ * gcov-io.c (gcov_write_summary): Write out non-zero histogram
+ entries to function summary along with an occupancy bit vector.
+ (gcov_read_summary): Read in the histogram entries.
+ (gcov_histo_index): New function.
+ (gcov_histogram_merge): Ditto.
+ * gcov-io.h (gcov_type_unsigned): New type.
+ (struct gcov_bucket_type): Ditto.
+ (struct gcov_ctr_summary): Include histogram.
+ (GCOV_TAG_SUMMARY_LENGTH): Update to include histogram entries.
+ (GCOV_HISTOGRAM_SIZE): New macro.
+ (GCOV_HISTOGRAM_BITVECTOR_SIZE): Ditto.
+ (gcov_gcda_file_size): New parameter.
+ * profile.c (NUM_GCOV_WORKING_SETS): Ditto.
+ (gcov_working_sets): New global variable.
+ (compute_working_sets): New function.
+ (find_working_set): Ditto.
+ (get_exec_counts): Invoke compute_working_sets.
+ * loop-unroll.c (code_size_limit_factor): Call new function
+ find_working_set to obtain working set information.
+ * coverage.c (read_counts_file): Merge histograms, and
+ fix bug with accessing summary info for non-summable counters.
+ * basic-block.h (gcov_type_unsigned): New type.
+ (struct gcov_working_set_info): Ditto.
+ (find_working_set): Declare.
+ * gcov-dump.c (tag_summary): Dump out histogram.
+ * configure.ac (HOST_HAS_F_SETLKW): Set based on compile
+ test using F_SETLKW with fcntl.
+ * configure, gcc/config.in: Regenerate.
+
+2012-09-13 Xinliang David Li <davidxl@google.com>
+
+ * cgraphunit.c (cgraph_add_output_node): Check for
+ duplicates of compiler generated functions.
+
+2012-09-12 Cary Coutant <ccoutant@google.com>
+
+ * gcc.c (replace_extension_spec_func): Restrict search for
+ extension to last component of path.
+
+2012-09-10 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (output_pubname): Correct conditional.
+
+2012-09-10 Teresa Johnson <tejohnson@google.com>
+
+ * loop-unroll.c (code_size_limit_factor): Guard against divide
+ by zero exception.
+
+2012-09-05 Cary Coutant <ccoutant@gmail.com>
+
+ Backport trunk patch to fix a problem where type signature does
+ not include the type's context.
+
+ 2012-07-19 Jason Merrill <jason@redhat.com>
+
+ PR debug/53235
+ * dwarf2out.c (get_die_parent): New.
+ (generate_type_signature): Use it.
+
+2012-08-31 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (clone_tree_partial): Restore.
+ (copy_decls_walk): Call clone_tree_partial to copy children
+ of non-declaration DIEs.
+
+2012-08-29 Chris Manghane <cmang@google.com>
+
+ Backport r190762 from google/main.
+
+ 2012-08-28 Chris Manghane <cmang@google.com>
+
+ * gcc/gcov.c
+ (release_structures): Removed filename field from PMU structures.
+ (filter_pmu_data_lines): Added PMU string table support.
+ (process_pmu_profile): Ditto.
+ * gcc/gcov-io.c
+ (gcov_read_pmu_load_latency_info): Replaced filename field with filetag.
+ (gcov_read_pmu_branch_mispredict_info): Ditto.
+ (gcov_read_pmu_string_table_entry): New Function.
+ (print_load_latency_line): Replaced filename field with filetag.
+ (print_branch_mispredict_line): Ditto.
+ (print_string_table_entry): New function.
+ * gcc/gcov-io.h
+ (GCOV_TAG_PMU_LOAD_LATENCY_LENGTH): Replaced filename field with filetag
+ (GCOV_TAG_PMU_BRANCH_MISPREDICT_LENGTH): Ditto.
+ (GCOV_TAG_PMU_STRING_TABLE_ENTRY): Added new tag.
+ (GCOV_TAG_PMU_STRING_TABLE_ENTRY_LENGTH): Ditto.
+ (gcov_pmu_load_latency_info): Replaced filename field with filetag.
+ (gcov_pmu_branch_mispredict_info): Ditto.
+ (gcov_pmu_string_table_entry): New struct.
+ (gcov_pmu_string_table): New struct.
+ (gcov_write_ll_line): Moved pmu writing utilities to global header.
+ (gcov_write_branch_mispredict_line): Ditto.
+ (gcov_write_string_table_entry): Ditto.
+ (gcov_write_tool_header): Ditto.
+ * gcc/gcov-dump.c
+ (tag_pmu_load_latency_info): Removed PMU filename field.
+ (tag_pmu_branch_mispredict_info): Ditto.
+ (tag_pmu_string_table_entry): New function.
+
+2012-08-29 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (clone_tree_partial): Remove.
+ (copy_decls_walk): Don't copy children of a declaration
+ into a type unit.
+
+2012-08-23 Teresa Johnson <tejohnson@google.com>
+
+ * config/i386/i386.md (anddi_1): Add new r,qm,Lh pattern
+ first to catch an and with 0xff that would be turned into
+ an andw on machines with length-changing prefix stalls,
+ and instead convert it into a zero-extending move.
+ (andsi_1, andhi_1): Ditto.
+ * config/i386/constraints.md (La): Rename from "L".
+ (Lh): New constraint to match possible LCP stalling ands.
+ * config/i386/i386.c (ix86_binary_operator_ok): Update
+ for rename of "L" constraint.
+
+2012-08-23 Teresa Johnson <tejohnson@google.com>
+
+ * Revert r189866
+
+2012-08-23 Xinliang David Li <davidxl@google.com>
+
+ *coverage.c (check_cg_opts): New function.
+ (has_incompatible_cg_opts): Ditto.
+ (incompatible_cl_args): Handle incompatible cg
+ options more generally, and added -fsized-delete.
+
+2012-08-23 Sriraman Tallam <tmsriram@google.com>
+
+ Backport r186789,r186795,r186855,r187365,r188417
+
+ r186789:
+ 2012-04-24 Sriraman Tallam <tmsriram@google.com>
+
+ * config/i386/i386.c (build_processor_model_struct): New function.
+ (make_var_decl): New function.
+ (fold_builtin_cpu): New function.
+ (ix86_fold_builtin): New function.
+ (make_cpu_type_builtin): New function.
+ (ix86_init_platform_type_builtins): New function.
+ (ix86_expand_builtin): Expand new builtins by folding them.
+ (ix86_init_builtins): Make new builtins to detect CPU type.
+ (TARGET_FOLD_BUILTIN): New macro.
+ (IX86_BUILTIN_CPU_INIT): New enum value.
+ (IX86_BUILTIN_CPU_IS): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS): New enum value.
+ * config/i386/i386-builtin-types.def: New function type.
+ * testsuite/gcc.target/builtin_target.c: New testcase.
+ * doc/extend.texi: Document builtins.
+
+ r186795:
+ No changes.
+
+ r186855:
+ 2012-04-25 Sriraman Tallam <tmsriram@google.com>
+
+ * doc/extend.texi: Document avx2 support.
+ * config/i386/i386.c (fold_builtin_cpu): Add avx2.
+ * testsuite/gcc.target/i386/builtin_target.c: Check avx2.
+
+ r187365:
+ 2012-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init):
+ Document requirement to call in constructors.
+
+ * config/i386/i386.c: Update comments for i386-cpuinfo.c name
+ change.
+
+ r188417:
+ 2012-06-11 Sriraman Tallam <tmsriram@google.com>
+
+ * testsuite/gcc.target/i386/builtin_target.c (vendor_signatures): New enum.
+ (check_intel_cpu_model): New function.
+ (check_amd_cpu_model): New function.
+ (check_features): New function.
+ (__get_cpuid_output): New function.
+ (check_detailed): New function.
+ (fn1): Rename to quick_check.
+ (main): Update to call quick_check and call check_detailed.
+
+2012-08-22 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (should_move_die_to_comdat): A type definition
+ can contain a subprogram definition, but don't move it to a
+ comdat unit.
+
+2012-08-20 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (remove_loc_list_addr_table_entries): Change
+ parameter; update all calls.
+ (output_pubname): Don't assert on unknown TAGs.
+ (resolve_addr): Call remove_loc_list_addr_table_entries for all
+ location expressions.
+
+2012-08-20 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (DEBUG_PUBNAMES_SECTION, DEBUG_PUBTYPES_SECTION): Adjust
+ macros.
+ (is_java, include_pubname_in_output): New functions.
+ (size_of_pubnames): Call include_pubname_in_output. New variable
+ space_for_flags.
+ (output_pubnames): Refactor, moving most of the logic to...
+ (output_pubname): ... here. New function.
+ (dwarf2out_finish): Move output pubtable logic to...
+ (output_pubtables): ... here. New function.
+ * common.opt (ggnu-pubnames): New option.
+ (gpubnames, gno-pubnames): Adjust.
+ * doc/invoke.texi: Document -ggnu-pubnames.
+
+2012-08-17 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (is_class_die): Remove function.
+ (add_pubname): Call class_scope_p instead.
+
+2012-08-17 Xinliang David Li <davidxl@google.com>
+
+ cgraphunit.c (is_backend_entered_p): New function.
+
+2012-08-14 Han Shen <shenhan@google.com>
+ Backport from mainline.
+
+ 2012-05-01 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef
+ comparing enumeration values. Update comments.
+
+ 2012-04-26 Michael Hope <michael.hope@linaro.org>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
+ (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
+ (GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
+ (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
+
+2012-08-13 Xinliang David Li <davidxl@google.com>
+
+ Google ref/6911651
+ * tree-ssa.c (warn_uninitialized_vars): Guard
+ possibly uninitialized warning under
+ -Wmaybe-uninitialized
+
+2012-08-09 Cary Coutant <ccoutant@google.com>
+
+ * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Check for
+ discriminator.
+ * diagnostic.c (diagnostic_report_current_module): Likewise.
+
+2012-08-09 Cary Coutant <ccoutant@google.com>
+
+ Backport of pending upstream patch.
+
+ * dwarf2out.c (clone_as_declaration): Copy DW_AT_abstract_origin
+ attribute.
+ (generate_skeleton_bottom_up): Remove DW_AT_object_pointer attribute
+ from original DIE.
+ (clone_tree_hash): Rename to ...
+ (clone_tree_partial): ... this; change callers. Copy
+ DW_TAG_subprogram DIEs as declarations.
+
+2012-08-07 Cary Coutant <ccoutant@google.com>
+
+ Backport r190190 from trunk.
+
+ * cgraphunit.c (assemble_thunk): Add source line info.
+ * final.c (final): Check for non-null cfg pointer.
+
+2012-08-01 Dehao Chen <dehao@google.com>
+
+ Backport r190015 from trunk:
+
+ 2012-07-31 Dehao Chen <dehao@google.com>
+ * predict.c (tree_estimate_probability_driver): Normalize the
+ loop when initializing the loop optimizer.
+
+2012-07-26 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (dwo_id_placeholder): Delete.
+ (output_skeleton_debug_sections): Don't write dwo_id here.
+ (dwarf2out_finish): Compute dwo_id and write it to both comp units.
+
+2012-07-25 Cary Coutant <ccoutant@google.com>
+
+ Backport pending upstream patch to output DW_AT_high_pc as a constant
+ instead of a relocated address. This significantly reduces the number
+ of entries used in the .debug_addr table with -gfission.
+
+ 2012-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf2out.h (enum dw_val_class): Add dw_val_class_high_pc.
+ * dwarf2out.c (dw_val_equal_p): Handle dw_val_class_high_pc.
+ (add_AT_low_high_pc): New function.
+ (AT_lbl): Handle dw_val_class_high_pc.
+ (print_die): Likewise.
+ (attr_checksum): Likewise.
+ (attr_checksum_ordered): Likewise.
+ (same_dw_val_p): Likewise.
+ (size_of_die): Likewise.
+ (value_format): Likewise.
+ (output_die): Likewise.
+ (gen_subprogram_die): Use add_AT_low_high_pc.
+ (add_high_low_attributes): Likewise.
+ (dwarf2out_finish): Likewise.
+
+2012-07-25 Teresa Johnson <tejohnson@google.com>
+
+ Backport the following patches from trunk to ensure that
+ "andw $0xff, $reg" is always converted to a zero extend
+ to avoid LCP stalls on core2/corei7 (b/6615073):
+ r184891, r186839, r186979, r186993, r188630, r188634, r188648
+
+ r184891:
+ 2012-03-04 Uros Bizjak <ubizjak@gmail.com>
+ * config/i386/constraints.md (Ya): New internal constraint.
+ * config/i386/i386.md (zero_extendsidi2): Remove expansion.
+ (*zero_extendsidi2_rex64): Add x,x alternative.
+ (*zero_extendsidi2): Ditto. Add o,0 alternative.
+ Remove flags reg clobber. Adjust corresponding splits.
+ (zero_extend<mode>si2): Macroize expander from zero_extendhisi2 and
+ zero_extendqisi2 expanders using SWI12 mode iterator.
+ (zero_extend<mode>si2_and): Macroize insn from
+ zero_extendhisi2_and and zero_extendqisi2_and. Merge corresponding
+ splitters.
+ (*zero_extend<mode>si2): Macroize insn from
+ *zero_extendhisi2_movzbl and *zero_extendqisi2_movzbl.
+ (*zero_extend*2_movzbl_and): Remove insn patterns.
+ (zero_extendqihi2_and): Merge corresponding splitter.
+ (*zero_extendqihi2): Rename from *zero_extendqihi2_movzbl.
+ (*zero_extend*2_movzbl_and): Remove insn patterns.
+ (*anddi_1): Split TYPE_IMOVX instructions.
+ (*andsi_1): Use Ya for alternative 2. Split TYPE_IMOVX instructions.
+ (*andhi_1): Ditto.
+ (and->zext splitter): Add splitter pattern.
+ (zero extend with andsi3 splitter): Adjust zero_extend pattern.
+
+ r186839:
+ 2012-04-25 Jakub Jelinek <jakub@redhat.com>
+ PR target/53110
+ * config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg
+ instead expand it as zero extension.
+
+ r186979:
+ 2012-04-30 Uros Bizjak <ubizjak@gmail.com>
+ * config/i386/i386.md (and<mode>3): Expand masking operations with
+ 0xff, 0xffff or 0xffffffff immediates to corresponding zero_extend RTX.
+ (and splitter): Split to DImode zero_extend RTX for DImode operand[0].
+
+ r186993:
+ 2012-04-30 Uros Bizjak <ubizjak@gmail.com>
+ * config/i386/i386.md (and<mode>3): Change runtime operand mode checks
+ to compile-time "mode == <MODE>mode" checks.
+ (and splitter): Ditto.
+
+ r188630:
+ 2012-06-14 Uros Bizjak <ubizjak@gmail.com>
+ * config/i386/i386.md (*zero_extendsidi2): Remove x,x alternative.
+ (*zero_extendsidi2_rex64): Ditto. Remove isa attribute.
+
+ r188634:
+ 2012-06-14 Uros Bizjak <ubizjak@gmail.com>
+ Fix my previous commit to:
+ * config/i386/i386.md (*zero_extendsidi2): Remove x,x alternative.
+ (*zero_extendsidi2_rex64): Ditto. Remove isa attribute.
+
+ r188648:
+ 2012-06-14 Uros Bizjak <ubizjak@gmail.com>
+ (*zero_extendsidi2_rex64): Remove isa attribute.
+
+2012-07-25 Cary Coutant <ccoutant@google.com>
+
+ * common.opt (-gfission): Alias for -gsplit-dwarf.
+ (-gno-fission): Alias for -gno-split-dwarf.
+
+2012-07-25 Diego Novillo <dnovillo@google.com>
+
+ Merge from gcc-4_7-branch rev 189718.
+
+2012-07-24 Cary Coutant <ccoutant@google.com>
+
+ Backport pending Fission patch at http://codereview.appspot.com/6305113.
+
+ 2012-07-18 Sterling Augustine <saugustine@google.com>
+ Cary Coutant <ccoutant@google.com>
+
+ * common.opt (gno-split-dwarf, gsplit-dwarf): New switches.
+ * doc/invoke.texi (Debugging Options): Document them.
+ * opts.c (finish_options): Make gsplit-dwarf imply -gpubnames.
+ * dwarf2out.h (dw_val_struct): New field val_index.
+ * dwarf2out.c (debug_skeleton_info_section,
+ debug_skeleton_abbrev_section, debug_addr_section,
+ debug_skeleton_line_section, debug_str_offsets_section): New sections.
+ (indirect_string_node): Add index field.
+ (dw_loc_list_node): Add begin_index field.
+ (dw_addr_op, new_addr_loc_descr, AT_index, set_AT_index,
+ add_addr_table_entry, remove_addr_table_entry, output_range_list_offset,
+ output_loc_list_offset, output_attr_index_or_value,
+ remove_loc_list_addr_table_entries, output_die_abbrevs,
+ add_top_level_skeleton_die_attrs, get_skeleton_type_unit,
+ output_skeleton_debug_sections, output_index_strings,
+ output_addr_table, index_location_lists): New functions.
+ (DEBUG_DWO_INFO_SECTION, DEBUG_DWO_ABBREV_SECTION, DEBUG_ADDR_SECTION,
+ DEBUG_NORM_MACINFO_SECTION, DEBUG_DWO_MACINFO_SECTION,
+ DEBUG_DWO_LINE_SECTION, DEBUG_DWO_LOC_SECTION,
+ DEBUG_NORM_STR_OFFSETS_SECTION, DEBUG_DWO_STR_SECTION,
+ DEBUG_MACRO_SECTION_FLAGS, DEBUG_SKELETON_LINE_SECTION_LABEL,
+ DEBUG_SKELETON_INFO_SECTION_LABEL, DEBUG_SKELETON_ABBREV_SECTION_LABEL,
+ DEBUG_ADDR_SECTIN_LABEL, SKELETON_COMP_DIE_ABBREV,
+ SKELETON_TYPE_DIE_ABBREV): New defines.
+ (DEBUG_MACINFO_SECTION, DEBUG_MACRO_SECTION, DEBUG_STR_SECTION
+ DEBUG_STR_SECTION_FLAGS): Adjust definitions.
+ (TEXT_SECTION_LABEL, COLD_TEXT_SECTION_LABEL, DEBUG_INFO_SECTION_LABEL,
+ DEBUG_ABBREV_SECTION_LABEL, DEBUG_LOC_SECTION_LABEL,
+ DEBUG_RANGES_SECTION_LABEL, DEBUG_MACINFO_SECTION_LABEL,
+ DEBUG_MACRO_SECTION_LABEL): Adjust indentation.
+ (debug_skeleton_info_section_label, debug_skeleton_abbrev_section_label,
+ debug_addr_section_label, debug_skeleton_line_section_label,
+ dw_id_placeholder): New global variables.
+ (add_AT_lbl_id): Add force_direct parameter. Adjust calls throughout
+ file. Handle dwarf_split_debug_info.
+ (add_AT_addr). Likewise. Initialize val_index_field.
+ (add_AT_range_list): Add force parameter. Adjust calls throughout file.
+ Initialize val_index field.
+ (add_ranges_by_labels): Add and handle force_direct parameter. Adjust
+ calls throughout file.
+ (size_of_die): New variable form. Handle dwarf_split_debug_info and
+ call AT_index.
+ (value_format): Use AT_class instead of calling val_class directly.
+ Handle DW_FORM_addr and dw_val_class_lbl_id appropriately for
+ dwarf_split_debug_info and AT_index.
+ (output_abbrev_section): Move most code to new function
+ output_die_abbrevs.
+ (output_loc_list): Handle dwarf_split_debug_info by using
+ DW_LLE_start_length_entry and DW_LLE_end_of_list_entry.
+ (output_die): Call output_attr_index_or_value, output_range_list_offset,
+ Fix format string. Check val_str->form directly to avoid side effect.
+ (add_pubtype): Fix indention.
+ (output_comdat_type_unit): Handle dwarf_split_debug_info.
+ (output_pubnames): Likewise.
+ (output_aranges): Likewise.
+ (output_mac_info): Likewise.
+ (output_line_info): New parameter prologue_only. Adjust calls
+ throughout file.
+ (mem_loc_descriptor): Call new_addr_loc_descr.
+ (loc_descriptor): Likewise.
+ (add_const_value_attribute): Likewise.
+ (loc_list_from_tree): Replace first_op and second_op with tls_op.
+ Update associated logic. Call new_addr_loc_descr.
+ (dwarf2out_init): Handle dwarf_split_debug_info. Initialize
+ debug_skeleton_info_section, debug_skeleton_abbrev_section,
+ debug_addr_section, debug_skeleton_line_section,
+ debug_str_offsets_section, debug_skeleton_info_section_label,
+ debug_skeleton_abbrev_section_label, debug_addr_section_label and
+ debug_skeleton_line_section_label. Use DEBUG_MACRO_SECTION_FLAGS.
+ (new_loc_descr, build_cfa_loc, add_AT_flag, add_AT_int, add_AT_unsigned,
+ add_AT_double, add_AT_vec, add_AT_data8, add_AT_string, add_AT_die_ref,
+ add_AT_fde_ref, add_AT_loc, add_AT_loc_list, add_AT_file,
+ add_AT_vms_delta, add_AT_lineptr, add_AT_macptr, add_AT_offset):
+ Initialize val_index field.
+ (size_of_loc_descr, output_loc_operands, output_loc_operands_raw,
+ resolve_addr_in_expression, hash_loc_operands): Handle
+ DW_OP_GNU_addr_index and DW_OP_GNU_const_index.
+ (compare_loc_operands): Likewise. Adjust assertion.
+ (AT_string_form): Handle dwarf_split_debug_info.
+ (resolve_addr): New local variable l. Check val_index. Call
+ remove_addr_table_entry and remove_loc_list_addr_table_entries.
+ (dwarf2out_finish): Handle dwarf_split_debug_info. New variable
+ main_comp_unit_die. Call index_location_lists, add_AT_data8,
+ add_AT_lineptr, output_skeleton_debug_sections, output_addr_table. Move
+ call to ASM_GENERATE_INTERNAL_LABEL to dwarf2out_init. Call
+ ASM_OUTPUT_LABEL for debug_skeleton_line_section_label and
+ debug_addr_section_label. Adjust comment.
+ * gcc.c (replace_extension_spec_func): New function.
+ (ASM_FINAL_SPEC): Adjust. Fix related comments.
+ (check_live_switch): Likewise.
+
+2012-07-24 Xinliang David Li <davidxl@google.com>
+
+ * diagnostic.c (diagnostic_initialize): Initialize
+ new field.
+ (diagnostic_report_diagnostic): Honor -Wforce-warnings.
+ * diagnostic.h: New field.
+ * opts.c (common_handle_option): Handle new option.
+ * coverage.c (get_da_file_name): Handle new option.
+ * common.opt: New options.
+
+2012-07-24 Cary Coutant <ccoutant@google.com>
+
+ Backport Fission patches from trunk at r188195, r188857, r189084,
+ r189094, and r189392.
+
+ 2012-06-29 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (add_pubname_string): Don't check for want_pubnames.
+ (gen_subprogram_die): Don't add pubname if want_pubnames is false.
+ (gen_variable_die): Likewise.
+ (gen_namespace_die): Likewise.
+
+ 2012-06-29 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (add_pubname): Add comment.
+ (add_pubtype): Fix indentation.
+ (gen_enumeration_type_die): Likewise.
+
+ 2012-06-21 Sterling Augustine <saugustine@google.com>
+ Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (is_cu_die, is_namespace_die, is_class_die,
+ add_AT_pubnames, add_enumerator_pubname, want_pubnames): New functions.
+ (comdat_type_struct): New field 'skeleton_die'.
+ (breakout_comdat_types): Update it.
+ (add_pubname): Rework logic. Call is_class_die, is_cu_die and
+ is_namespace_die. Fix minor style violation. Call want_pubnames.
+ (add_pubname_string): Call want_pubnames.
+ (add_pubtype): Rework logic for calculating type name. Call
+ is_namespace_die. Call want_pubnames.
+ (output_pubnames): Move conditional logic deciding when to produce the
+ section from dwarf2out_finish. Use new skeleton_die field.
+ (base_type_die): Call add_pubtype.
+ (gen_enumeration_type_die): Unconditionally call add_pubtype.
+ (gen_subprogram_die): Adjust calls to add_pubname.
+ (gen_namespace_die): Call add_pubname_string.
+ (dwarf2out_finish): Call add_AT_pubnames; Move logic on when to
+ produce pubnames and pubtypes sections to output_pubnames.
+ * common.opt: New option '-gpubnames'.
+ * doc/invoke.texi: Document it.
+
+2012-07-19 Easwaran Raman <eraman@google.com>
+
+ * params.def (HOT_BB_COUNT_FRACTION): Set default to 60000.
+
+2012-07-19 Rong Xu <xur@google.com>
+
+ Backport r189691 from google_main.
+ * gcc/gcov-io.h (GCOV_TAG_MODULE_INFO): tag needs to be
+ an odd number in each active level.
+
+2012-07-10 Xinliang David Li <davidxl@google.com>
+
+ Backport r189413 from trunk
+ * doc/invoke.texi: New option documented.
+ * flag-types.h: New enum type.
+ * gimplify.c (gimplify_bind_expr): Control
+ clobber generation with new option.
+ (gimplify_target_expr): Ditto.
+ common.opt: New option.
+
+2012-07-10 Xinliang David Li <davidxl@google.com>
+
+ * Revert r189107
+
+2012-07-01 Xinliang David Li <davidxl@google.com>
+
+ * common.opt: -ftemp-reuse-stack option.
+ * gimplify.c (gimplify_target_expr): Check new flag.
+
+2012-06-29 Xinliang David Li <davidxl@google.com>
+
+ * coverage.c (coverage_init): Initialize dyn-ipa
+ paramater decls.
+ * tree-profile.c (init_comdat_decl): New function.
+ (tree_init_dyn_ipa_paramters): Ditto.
+
+2012-06-27 Dehao Chen <dehao@google.com>
+
+ Backport from trunk r188981.
+ * tree-inline.c: (expand_call_inline): Ensure that lexical block's
+ source location is consistant with the call stmt.
+
+2012-06-21 Diego Novillo <dnovillo@google.com>
+
+ Merge from trunk rev 188808.
+
+2012-06-15 Cary Coutant <ccoutant@google.com>
+
+ Revert Fission patches r182490, r182891, r183042, and r183320.
+ This will clear the way to backport the final patches from trunk.
+
+ r182490:
+
+ 2011-12-19 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (DEBUG_PUBNAMES_SECTION_LABEL,
+ DEBUG_PUBTYPES_SECTION_LABEL): Define.
+ (debug_pubnames_section_label, debug_pubtypes_section_label):
+ Declare.
+ (is_namespace_die, is_class_die): New functions.
+ (add_enumerator_pubname): New function.
+ (add_pubname): Call is_namespace_die, is_cu_die, and is_class_die in
+ conditional.
+ (add_pubtype): Call is_namespace_die. Rework name calculation. Call
+ type_tag, lang_hooks.dwarf_name and add_enumerator_pubname.
+ (output_pubnames): Output debug_pubnames_section_label or
+ debug_pubtypes_section_label.
+ (base_type_die): Call add_pubtype.
+ (gen_namespace_die): Call add_pubname_string and lang_hooks.dwarf_name.
+ (dwarf2_out_init): Generate debug_pubnames_section_label and
+ debug_pubtypes_section_label.
+ (pubtypes_section_empty): New function.
+ (dwarf2_out_finish): Call add_AT_lineptr if pubnames or pubtypes is
+ non-empty. When dealing with pubnames, change assertion to conditional.
+ Call pubtypes_section_empty. Likewise when dealing with pubtypes.
+ Move code checking for empty section to...
+ (pubtypes_section_empty): Here.
+ * target.def: Switch boolean to enable pubnames and pubtypes.
+
+ r182891:
+
+ 2012-01-04 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (add_pubname): Move conditional clause from outer to
+ inner if-statement.
+ (dwarf2out_finish): Fix conditions to output DW_AT_GNU_pubnames and
+ DW_AT_GNU_pubtypes. Move decision to output pubnames and pubtypes from
+ here...
+ (output_pubnames): ...to here.
+ (pubtypes_section_empty): Delete unused function.
+
+ r183042:
+
+ 2012-01-09 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (output_pubnames): Add check for info_section_emitted.
+
+ r183320:
+
+ 2012-01-19 Sterling Augustine <saugustine@google.com>
+
+ * dwarf2out.c (break_out_comdat_types): Add DW_AT_GNU_pubnames and
+ DW_AT_GNU_pubtypes attributes.
+
+2012-06-15 Easwaran Raman <eraman@google.com>
+ Cherrypick r188675 from trunk.
+ 2012-06-15 Easwaran Raman <eraman@google.com>
+ * passes.c (init_optimization_passes): Remove pass_call_cdce
+ from its current position and insert after pass_dce.
+
+2012-06-09 Xinliang Davidl Li <davidxl@google.com>
+
+ l-ipo.c (pop_module_scope): Stop timer after
+ pending decl handling.
+
+2012-06-09 Xinliang Davidl Li <davidxl@google.com>
+
+ c-family/c-opts.c (lipo_max_mem_reached): Scale up
+ memory allocated to acount for optimizer uses.
+ params.def: tune up max lipo mem parameter to 2.8G.
+
+2012-06-07 Easwaran Raman <eraman@google.com>
+ Backport r179412 from google/gcc-4_6 branch.
+ 2011-09-30 Easwaran Raman <eraman@google.com>
+
+ * tree-profile.c (gcov_sample_counter_decl): Add GTY marker.
+ (gcov_sampling_rate_decl): Likewise.
+ (add_sampling_to_edge_counters): Do not free
+ instrumentation_to_be_sampled.
+ (cleanup_instrumentation_sampling): New function.
+ (tree_profiling): Call cleanup_instrumentation_sampling at the end.
+
+2012-06-07 Teresa Johnson <tejohnson@google.com>
+
+ Backport from google/main r188308.
+ 2012-06-07 Teresa Johnson <tejohnson@google.com>
+
+ * doc/invoke.texi: Rename -fripa-peel-size-limit
+ and -fripa-unroll-size-limit to -fpeel-codesize-limit and
+ -funroll-codesize-limit, respectively. Remove
+ codesize-hotness-threshold param and add unrollpeel-hotness-threshold
+ param.
+ * gcov-io.c (gcov_write_summary): Write new summary info.
+ (gcov_read_summary): Read new summary info.
+ * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Update for new summary info.
+ (struct gcov_ctr_summary): Add new summary info: num_hot_counters.
+ * loop-unroll.c (limit_code_size): Renamed to
+ code_size_limit_factor.
+ (code_size_limit_factor): Renamed from limit_code size. Update to
+ use new summary info and refine for very hot loops.
+ (decide_unrolling_and_peeling): Remove call to limit_code_size.
+ (decide_unroll_runtime_iterations): Call code_size_limit_factor
+ to control the unroll factor.
+ (decide_peel_simple, decide_unroll_stupid): Ditto.
+ * coverage.c (read_counts_file): Propagate new summary info.
+ * common.opt: Rename -fripa-peel-size-limit
+ and -fripa-unroll-size-limit to -fpeel-codesize-limit and
+ -funroll-codesize-limit, respectively.
+ * tree-optimize.c (cgraph_codesize_estimate): Remove.
+ (compute_codesize_estimate): Remove.
+ (execute_cleanup_cfg_post_optimizing): Remove call to
+ compute_codesize_estimate.
+ * params.def (PARAM_UNROLLPEEL_CODESIZE_THRESHOLD): Remove.
+ (PARAM_UNROLLPEEL_HOTNESS_THRESHOLD): Add.
+ * gcov-dump.c (tag_summary): Dump new summary info.
+
+2012-06-07 Dehao Chen <dehao@google.com>
+
+ * gcc/cgraph.c (cgraph_node): Add attribute to function decl.
+ * gcc/opts-global.c (add_attribute_pattern): New function.
+ (pattern_match_function_attributes): New function.
+ (handle_common_deferred_options): Handle new options.
+ * gcc/opts.c (common_handle_option): Handle new options.
+ * gcc/opts.h (handle_common_deferred_options): New function.
+ * gcc/common.opt (ffunction_attribute_list): New option.
+
+2012-06-06 Diego Novillo <dnovillo@google.com>
+
+ Cherry pick rev 188207.
+
+ 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53524
+ * doc/invoke.texi (Wenum-compare): Update documentation.
+
+ /cp
+ 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53524
+ * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
+ to control enumeral mismatch in conditional expression too.
+
+ /testsuite
+ 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53524
+ * g++.dg/warn/Wenum-compare-no-2: New.
+
+2012-06-06 Xinliang David Li <davidxl@google.com>
+
+ coverage.c (coverage_finish): Do not remove gcda file with
+ -frandom-seed option -- this recovers the compiler behavior
+ before gcc4_7.
+
+
+2012-06-05 Diego Novillo <dnovillo@google.com>
+
+ Merge from gcc-4_7-branch rev 188095 (minus rev 187877).
+
+2012-06-02 Xinliang David Li <davidxl@google.com>
+
+ l-ipo.c (promote_static_var_func): Promoted static variables from
+ primary modules should be marked as externally visible and being
+ prevailing def to avoid being localized again later.
+
+
+2012-06-02 Easwaran Raman <eraman@google.com>
+
+ * gcc/ipa-inline.c (want_early_inline_function_p): Boost early
+ inlining of comdats. Allow more tuning by using params.
+ * gcc/params.def (PARAM_EARLY_INLINING_INSNS_NON_LEAF): New param.
+ (PARAM_EARLY_INLINING_INSNS_ANY): Likewise.
+ (PARAM_EARLY_INLINING_INSNS_COMDAT): Likewise.
+
+2012-05-30 Dehao Chen <dehao@google.com>
+
+ * predict.c (predict_extra_loop_exit): New function to predict for
+ extra loop exits resulted from short-circuit conditions.
+
+2012-05-24 Rong Xu <xur@google.com>
+
+ * l-ipo.c (create_unique_name): Make temp names demanglable.
+
+2012-05-21 Easwaran Raman <eraman@google.com>
+
+ * gcc/basic-block.h (maybe_hot_count_p): New declaration.
+ * gcc/cgraph.c (dump_cgraph_node): Dump max_bb_count.
+ (cgraph_clone_node): Update max_bb_count.
+ * gcc/cgraph.h (cgraph_node): Add new field max_bb_count.
+ * gcc/cgraphbuild.c (rebuild_cgraph_edges): Compute max_bb_count.
+ * gcc/cgraphunit.c (cgraph_copy_node_for_versioning): Copy max_bb_count.
+ * gcc/ipa-inline-transform.c (inline_call): Update max_bb_count of
+ the function to which this callsite is eventually inlined to.
+ * gcc/ipa-inline.c (edge_hot_enough_p): New function.
+ (want_inline_small_function_p): Call edge_hot_enough_p instead
+ of cgraph_maybe_hot_edge_p.
+ * gcc/params.def (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE): New param.
+ * gcc/predict.c (maybe_hot_count_p): Make it non static.
+ * gcc/testsuite/gcc.dg/tree-prof/inliner-1.c: Add option
+ --param inline-hot-caller=0.
+ * gcc/testsuite/gcc.dg/tree-prof/lipo/inliner-1_0.c: Likewise.
+
+2012-05-18 Teresa Johnson <tejohnson@google.com>
+
+ Backport from google/main r187660:
+ 2012-05-18 Teresa Johnson <tejohnson@google.com>
+
+ * doc/invoke.texi: Update the documentation with new params.
+ * loop-unroll.c (loop_has_FP_comp): Remove function.
+ (max_unroll_with_branches): New function.
+ (decide_unroll_constant_iterations, decide_unroll_runtime_iterations):
+ Add heuristic to avoid increasing branch mispredicts when unrolling.
+ (limit_code_size, decide_peel_simple, decide_unroll_stupid): Retrieve
+ number of branches from niter_desc instead of via function that walks
+ loop.
+ * loop-iv.c (get_simple_loop_desc): Invoke new analyze_loop_insns
+ function, and add guards to enable this function to work for the
+ outermost loop.
+ * cfgloop.c (insn_has_fp_set, analyze_loop_insns): New functions.
+ (num_loop_branches): Remove.
+ * cfgloop.h (struct niter_desc): Added new fields to cache additional
+ loop analysis information.
+ (num_loop_branches): Remove.
+ (analyze_loop_insns): Declare.
+ * params.def (PARAM_MIN_ITER_UNROLL_WITH_BRANCHES): New param.
+ (PARAM_UNROLL_OUTER_LOOP_BRANCH_BUDGET): Ditto.
+
+2012-05-16 Sriraman Tallam <tmsriram@google.com>
+
+ Port from google/gcc-4_6
+ r177289, r177308, r179104, r179289, r179303, r179404, r182447
+
+ * doc/invoke.texi: Document -freorder-functions=*
+ * cgraphbuild.c (remove_cgraph_callee_edges): Preserve
+ callgraph till pass_final.
+ * configure: Regenerate.
+ * final.c (dump_cgraph_profiles): New function.
+ (rest_of_handle_final): Call dumping of cgraph profiles in
+ .gnu.text.callgraph sections.
+ * gcc.c (LINK_COMMAND_SPEC): Process -freorder-functions=
+ (set_func_reorder_linker_plugin_spec): New function.
+ (main): Call function reorder plugin.
+ * testsuite/lib/target-supports-dg.exp
+ (dg-require-section-exclude): New proc.
+ (dg-require-linker-function-reordering-plugin): New proc.
+ * testsuite/lib/target-supports.exp
+ (check_section_exclude_available): New proc.
+ (check_linker_function_reordering_plugin_supported): New proc.
+ * testsuite/g++.dg/tree-prof/callgraph-profiles.C: New test.
+ * config.in: undef FRPLUGINSONAME
+ * opts.c
+ * configure.ac (FRPLUGINSONAME): Define
+ * common.opt (fcallgraph-profiles-sections): Remove.
+ (freorder-functions=): New option.
+ * tree-optimize.c (gate_all_optimizations): Mark last cleanup of
+ callgraph.
+ * config.host: Set function reordering plugin.
+ * params.def (PARAM_NOTE_CGRAPH_SECTION_EDGE_THRESHOLD): Remove.
+ (PARAM_GNU_CGRAPH_SECTION_EDGE_THRESHOLD): Add.
+
+2012-05-16 Xinliang David Li <davidxl@google.com>
+
+ * tree-profile.c (add_sampling_wrapper): Call
+ add_referenced_var for sampling related variables.
+ (gimple_init_instrumentation_sampling): Do not
+ call varpool_finalize for external decls.
+
+2012-05-16 Xinliang David Li <davidxl@google.com>
+
+ * cgraph.c (cgraph_set_call_stmt): Resolve target
+ to the real target in LIPO mode.
+ (cgraph_create_virtual_clone): Ditto.
+
+2012-05-16 Xinliang David Li <davidxl@google.com>
+
+ * c-family/c-opts.c (is_parsing_done_p): New function.
+ * cp/semantics.c (cp_clear_constexpr_hashtable): Ditto.
+ * cp/decl2.c (cp_clear_defered_fns): Clear constexpr hash.
+ * cp/mangle.c (mangle_decl): Save decl for binding clearing.
+ * cp/cp-tree.h: New prototype declaration.
+ * l-ipo.c: New prototype declaration.
+
+
+2012-05-15 Teresa Johnson <tejohnson@google.com>
+
+ Backport from google/main r187536:
+ 2012-05-15 Teresa Johnson <tejohnson@google.com>
+
+ * doc/invoke.texi (profile-generate-sampling-period): Rename
+ from profile-generate-sampling-rate.
+ * tree-profile.c (gcov_sampling_period_decl): Rename from
+ gcov_sampling_rate_decl.
+ (gcov_has_sampling_decl): New variable.
+ (insert_if_then, add_sampling_wrapper): Rename variables from "*rate*"
+ to "*period*".
+ (gimple_init_instrumentation_sampling): Ditto, and add handling
+ for gcov_has_sampling_decl.
+ * params.def (profile-generate-sampling-period): Rename
+ from profile-generate-sampling-rate.
+
+2012-05-15 Diego Novillo <dnovillo@google.com>
+
+ Merge from gcc-4_7-branch rev 187362.
+
+2012-05-14 Xinliang David Li <davidxl@google.com>
+
+ * cgraphbuild.c (record_reference_to_real_target_from_alias):
+ New function.
+ (mark_address): Record reference to the resolved target node
+ in LIPO mode. Also record reference to alias's real target.
+ (rebuild_cgraph_edges): As above.
+ * cgraph.c (cgraph_clone_edge): Create cgraph edge for
+ indirect call inlining edge properly.
+ * l-ipo.c (cgraph_lipo_get_resolved_node_1): Do not force
+ creating cgraph node.
+ (fixup_reference_list): New function.
+ (varpool_do_link): Fix up initializer's references to functions
+ after linking.
+
+2012-05-09 Teresa Johnson <tejohnson@google.com>
+
+ Backport from trunk r187297:
+ 2012-05-08 Teresa Johnson <tejohnson@google.com>
+
+ * gcov-io.h (__gcov_reset, __gcov_dump): Declare.
+ * doc/gcov.texi: Add note on using __gcov_reset and __gcov_dump.
+
+2012-05-08 Xinliang David Li <davidxl@google.com>
+
+ Fix issue 6457844
+
+ * ipa-inline-transform.c (inline_call): When
+ fixing up cgraph edge callees which are aliases,
+ find the real resolved alias target in LIPO mode.
+ * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee):
+ Remove unnecssary check in LIPO mode.
+ * ipa-inline.c (inline_small_functions): Compute
+ max_count properly by considering indirect edges.
+
+
+
+2012-05-08 Xinliang David Li <davidxl@google.com>
+
+ Fix issue 6461583
+
+ * profile.c (instrument_values): Skip static ctor/dtors
+ for ic counter allocation to match instrumentation.
+ * tree-profile.c (gimple_gen_ic_profiler): Remove
+ unnecessary guard in FDO mode.
+
+2012-05-03 Dehao Chen <dehao@google.com>
+
+ Backport r185949 from google-main.
+
+ 2012-03-29 Dehao Chen <dehao@google.com>
+
+ * predict.c (predict_iv_comparison): Add the comparison of
+ induction variable against its initial value.
+
+2012-05-01 Rong Xu <xur@google.com>
+
+ Backport r187028 from google-main.
+
+ 2012-05-01 Rong Xu <xur@google.com>
+
+ * gcc/cp/rtti.c (get_tinfo_decl): generate tinfo for aux
+ modules in LIPO.
+
+2012-04-25 Diego Novillo <dnovillo@google.com>
+
+ Add better commit message for recent merge.
+
+2012-04-25 Diego Novillo <dnovillo@google.com>
+
+ Merge from gcc-4_7-branch rev 186721.
+
+2012-04-20 Xinliang David Li <davidxl@google.com>
+
+ Backport r186622 from trunk
+ * tree-ssa-copy.c (propagate_tree_value_into_stmt): Use
+ update_call_from_tree when propagating into a call.
+
+
+ * varasm.c (alias_target_node_exist_p): New function.
+ (finish_alias_1): Use the new function in LIPO mode.
+
+2012-04-12 Xinliang David Li <davidxl@google.com>
+
+ * cgraphbuild.c (rebuild_cgraph_edges): Add ipa reference from
+ an alias node to its body node (post LIPO linking one) to avoid
+ the body being eliminated.
+ * varasm.c (finish_aliases_1): Do not emit error for an alias
+ which is artificial in LIPO mode -- it exists but can not be
+ found.
+
+2012-04-11 Teresa Johnson <tejohnson@google.com>
+
+ Revert r182254 since it is subsumed by r186332.
+
+2012-04-11 Teresa Johnson <tejohnson@google.com>
+
+ Backport r186176 from trunk.
+
+ 2012-04-05 Teresa Johnson <tejohnson@google.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.h (ix86_tune_indices): Add
+ X86_TUNE_LCP_STALL.
+ * config/i386/i386.md (move immediate to memory peephole2):
+ Add cases for HImode move when LCP stall avoidance is needed.
+ * config/i386/i386.c (initial_ix86_tune_features): Initialize
+ X86_TUNE_LCP_STALL entry.
+
+2012-04-10 Xinliang David Li <davidxl@google.com>
+
+ * mversn-dispatch.c (builtin_dispatch_ipa_clone): returns
+ TODO flags when there are changes.
+ (do_convert_builtin_dispatch): Ditto.
+
+2012-04-09 Xinliang David Li <davidxl@google.com>
+
+ Fix b/6300341: LIPO profile-gen ICEs
+
+ * coverage.c (converage_dc_end_function): Properly initialize
+ the fn_decl and ctr_data field of the coverage_data.
+
+2012-03-07 Sriraman Tallam <tmsriram@google.com>
+
+ Backport from google/main rev 185083
+
+ * config/i386/i386.c (build_struct_with_one_bit_fields): New function.
+ (make_var_decl): New function.
+ (get_field_from_struct): New function.
+ (fold_builtin_target): New function.
+ (ix86_fold_builtin): New function.
+ (ix86_expand_builtin): Expand new builtins by folding them.
+ (make_platform_builtin): New functions.
+ (ix86_init_platform_type_builtins): Make the new builtins.
+ (ix86_init_builtins): Make new builtins to detect CPU type.
+ (TARGET_FOLD_BUILTIN): New macro.
+ (IX86_BUILTIN_CPU_SUPPORTS_CMOV): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_MMX): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_POPCOUNT): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSE): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSE2): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSE3): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSSE3): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSE4_1): New enum value.
+ (IX86_BUILTIN_CPU_SUPPORTS_SSE4_2): New enum value.
+ (IX86_BUILTIN_CPU_INIT): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMD): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL_ATOM): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL_CORE2): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL_COREI7_NEHALEM): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL_COREI7_WESTMERE): New enum value.
+ (IX86_BUILTIN_CPU_IS_INTEL_COREI7_SANDYBRIDGE): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMDFAM10_BARCELONA): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMDFAM10_SHANGHAI): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMDFAM10_ISTANBUL): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMDFAM15H_BDVER1): New enum value.
+ (IX86_BUILTIN_CPU_IS_AMDFAM15H_BDVER2): New enum value.
+ * config/i386/i386-builtin-types.def: New function type.
+ * testsuite/gcc.target/builtin_target.c: New testcase.
+
+2012-03-07 Diego Novillo <dnovillo@google.com>
+
+ Merge from google/main rev 184996.
+
+2012-02-26 Ollie Wild <aaw@google.com>
+
+ * BASE-VER: Change to 4.7.x-google.
+
+2012-02-23 Diego Novillo <dnovillo@google.com>
+
+ * BASE-VER: Change to 4.7.0-google.
+ * DEV-PHASE: Change to prerelease.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 7dc5f19a573..cb419e16d59 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20121007
+20121207
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e947b4e43d1..c180f317247 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3459,7 +3459,7 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
$(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
- $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \
+ $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h pointer-set.h $(TIMEVAR_H) \
$(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
l-ipo.o : l-ipo.c l-ipo.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
toplev.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) debug.h $(GIMPLE_H) \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4fac921a89e..61c28a0a2f4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,43 @@
+2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR ada/52110
+ * s-osinte-hpux-dce.ads: Declare pthread_rwlockattr_t and
+ pthread_rwlock_t subtypes. Delete duplicate declaration of clockid_t.
+ * s-taspri-hpux-dce.ads: Change "pragma Atomic (Thread)" to comment.
+
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR other/52438
+ * s-taspri-lynxos.ads: Delete.
+ * s-osinte-kfreebsd-gnu.ads: Change license to GPL V3+.
+ * s-tpopsp-rtems.adb: Likewise.
+ * s-osinte-rtems.adb: Likewise.
+
+2012-10-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/Make-lang.in: Fix and clean up rules for C files.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Force
+ BLKmode on the type if it is passed by reference.
+ <E_Array_Subtype>: Likewise.
+ <E_Record_Type>: Guard the call to Is_By_Reference_Type predicate.
+ <E_Record_Subtype>: Likewise.
+
+ * gcc-interface/Makefile.in: Remove outdated comment and reference to
+ non-existing file.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (Loop_Statement_to_gnu): Use gnat_type_for_size
+ directly to obtain an unsigned version of the base type.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Out_Parameter>: Do not
+ generate the special PARM_DECL for an Out parameter in LTO mode.
+
2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 06a88030bdb..289f0b7f8b9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -1225,33 +1225,20 @@ ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads
ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-ada/adadecode.o : ada/adadecode.c $(CONFIG_H) $(SYSTEM_H) ada/adadecode.h
-ada/adaint.o : ada/adaint.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
-ada/argv.o : ada/argv.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
-ada/cstreams.o : ada/cstreams.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
-ada/exit.o : ada/exit.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
-ada/final.o : ada/final.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h
-ada/link.o : ada/link.c
-
-ada/targext.o : ada/targext.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
- $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
+ada/adadecode.o : ada/adadecode.c $(CONFIG_H) $(SYSTEM_H) ada/adadecode.h ada/adaint.h
+ada/adaint.o : ada/adaint.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h version.h
+ada/argv.o : ada/argv.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
ada/cio.o : ada/cio.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
- $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
+ada/cstreams.o : ada/cstreams.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
+ada/env.o: ada/env.c $(CONFIG_H) $(SYSTEM_H) ada/env.h
+ada/exit.o : ada/exit.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
+ada/final.o : ada/final.c
ada/init.o : ada/init.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ada/raise.h
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
- $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
-ada/initialize.o : ada/initialize.c
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
- $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-
+ada/initialize.o : ada/initialize.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h
+ada/link.o : ada/link.c auto-host.h
ada/raise.o : ada/raise.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ada/raise.h
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
- $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+ada/seh_init.o: ada/seh_init.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h
+ada/targext.o : ada/targext.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) ada/gcc-interface/ada.h ada/types.h ada/uintp.h \
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index f9e7edab3e1..9b5135e6f89 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1242,7 +1242,6 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix.adb \
- g-trasym.adb<g-trasym-dwarf.adb \
$(ATOMICS_TARGET_PAIRS) \
$(X86_64_TARGET_PAIRS) \
system.ads<system-freebsd-x86_64.ads
@@ -2518,8 +2517,6 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
$(RM) ../stamp-gnatlib-$(RTSDIR)
touch ../stamp-gnatlib1-$(RTSDIR)
-# GNULLI End #############################################################
-
ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
-DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 72bbd80d97e..97f8d65d2f5 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1508,7 +1508,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
the VAR_DECL. Suppress debug info for the latter but make sure it
will live on the stack so that it can be accessed from within the
debugger through the PARM_DECL. */
- if (kind == E_Out_Parameter && definition && !optimize && debug_info_p)
+ if (kind == E_Out_Parameter
+ && definition
+ && debug_info_p
+ && !optimize
+ && !flag_generate_lto)
{
tree param = create_param_decl (gnu_entity_name, gnu_type, false);
gnat_pushdecl (param, gnat_entity);
@@ -2251,6 +2255,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
TYPE_MULTI_ARRAY_P (tem) = (index > 0);
if (array_type_has_nonaliased_component (tem, gnat_entity))
TYPE_NONALIASED_COMPONENT (tem) = 1;
+
+ /* If it is passed by reference, force BLKmode to ensure that
+ objects of this type will always be put in memory. */
+ if (TYPE_MODE (tem) != BLKmode
+ && Is_By_Reference_Type (gnat_entity))
+ SET_TYPE_MODE (tem, BLKmode);
}
/* If an alignment is specified, use it if valid. But ignore it
@@ -2590,6 +2600,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
TYPE_MULTI_ARRAY_P (gnu_type) = (index > 0);
if (array_type_has_nonaliased_component (gnu_type, gnat_entity))
TYPE_NONALIASED_COMPONENT (gnu_type) = 1;
+
+ /* See the E_Array_Type case for the rationale. */
+ if (TYPE_MODE (gnu_type) != BLKmode
+ && Is_By_Reference_Type (gnat_entity))
+ SET_TYPE_MODE (gnu_type, BLKmode);
}
/* Attach the TYPE_STUB_DECL in case we have a parallel type. */
@@ -3158,7 +3173,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* If it is passed by reference, force BLKmode to ensure that objects
of this type will always be put in memory. */
- if (Is_By_Reference_Type (gnat_entity))
+ if (TYPE_MODE (gnu_type) != BLKmode
+ && Is_By_Reference_Type (gnat_entity))
SET_TYPE_MODE (gnu_type, BLKmode);
/* We used to remove the associations of the discriminants and _Parent
@@ -3526,12 +3542,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
modify it below. */
gnu_field_list = nreverse (gnu_field_list);
finish_record_type (gnu_type, gnu_field_list, 2, false);
+ compute_record_mode (gnu_type);
/* See the E_Record_Type case for the rationale. */
- if (Is_By_Reference_Type (gnat_entity))
+ if (TYPE_MODE (gnu_type) != BLKmode
+ && Is_By_Reference_Type (gnat_entity))
SET_TYPE_MODE (gnu_type, BLKmode);
- else
- compute_record_mode (gnu_type);
TYPE_VOLATILE (gnu_type) = Treat_As_Volatile (gnat_entity);
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 63363f5ffde..aabe9b6bd02 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -2402,7 +2402,8 @@ Loop_Statement_to_gnu (Node_Id gnat_node)
{
if (TYPE_PRECISION (gnu_base_type)
> TYPE_PRECISION (size_type_node))
- gnu_base_type = gnat_unsigned_type (gnu_base_type);
+ gnu_base_type
+ = gnat_type_for_size (TYPE_PRECISION (gnu_base_type), 1);
else
gnu_base_type = size_type_node;
diff --git a/gcc/ada/s-osinte-hpux-dce.ads b/gcc/ada/s-osinte-hpux-dce.ads
index 3b156a26597..e6ee0ed5e8f 100644
--- a/gcc/ada/s-osinte-hpux-dce.ads
+++ b/gcc/ada/s-osinte-hpux-dce.ads
@@ -244,6 +244,14 @@ package System.OS_Interface is
type pthread_condattr_t is limited private;
type pthread_key_t is private;
+ -- Read/Write lock not supported on HPUX. To add support both types
+ -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+ -- with the associated routines pthread_rwlock_[init/destroy] and
+ -- pthread_rwlock_[rdlock/wrlock/unlock].
+
+ subtype pthread_rwlock_t is pthread_mutex_t;
+ subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
-----------
-- Stack --
-----------
@@ -444,7 +452,6 @@ private
end record;
pragma Convention (C, timespec);
- type clockid_t is new int;
CLOCK_REALTIME : constant clockid_t := 1;
type cma_t_address is new System.Address;
diff --git a/gcc/ada/s-osinte-kfreebsd-gnu.ads b/gcc/ada/s-osinte-kfreebsd-gnu.ads
index 958d4217de4..23a28e2d545 100644
--- a/gcc/ada/s-osinte-kfreebsd-gnu.ads
+++ b/gcc/ada/s-osinte-kfreebsd-gnu.ads
@@ -9,23 +9,21 @@
-- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005,2008 Free Software Foundation, Inc. --
-- --
--- GNARL is free software; you can redistribute it and/or modify it under --
+-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNARL; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
diff --git a/gcc/ada/s-osinte-rtems.adb b/gcc/ada/s-osinte-rtems.adb
index fc99ce4e848..de21785941a 100644
--- a/gcc/ada/s-osinte-rtems.adb
+++ b/gcc/ada/s-osinte-rtems.adb
@@ -8,23 +8,21 @@
-- --
-- Copyright (C) 1991-2009 Florida State University --
-- --
--- GNARL is free software; you can redistribute it and/or modify it under --
+-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNARL; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>.
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
diff --git a/gcc/ada/s-taspri-hpux-dce.ads b/gcc/ada/s-taspri-hpux-dce.ads
index 9d51d5c4517..6cde3474699 100644
--- a/gcc/ada/s-taspri-hpux-dce.ads
+++ b/gcc/ada/s-taspri-hpux-dce.ads
@@ -102,7 +102,9 @@ private
type Private_Data is record
Thread : aliased System.OS_Interface.pthread_t;
- pragma Atomic (Thread);
+ -- pragma Atomic (Thread);
+ -- Unfortunately, the above fails because Thread is 64 bits.
+
-- Thread field may be updated by two different threads of control.
-- (See, Enter_Task and Create_Task in s-taprop.adb). They put the
-- same value (thr_self value). We do not want to use lock on those
diff --git a/gcc/ada/s-taspri-lynxos.ads b/gcc/ada/s-taspri-lynxos.ads
deleted file mode 100644
index 4e08865d831..00000000000
--- a/gcc/ada/s-taspri-lynxos.ads
+++ /dev/null
@@ -1,125 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
--- --
--- S Y S T E M . T A S K _ P R I M I T I V E S --
--- --
--- S p e c --
--- --
--- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2008, AdaCore --
--- --
--- GNARL is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNARL; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNARL was developed by the GNARL team at Florida State University. --
--- Extensive contributions were provided by Ada Core Technologies, Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This is a LynxOS version of this package, derived from s-taspri-posix.ads
-
-pragma Polling (Off);
--- Turn off polling, we do not want ATC polling to take place during tasking
--- operations. It causes infinite loops and other problems.
-
-with System.OS_Interface;
-
-package System.Task_Primitives is
- pragma Preelaborate;
-
- type Lock is limited private;
- -- Should be used for implementation of protected objects
-
- type RTS_Lock is limited private;
- -- Should be used inside the runtime system. The difference between Lock
- -- and the RTS_Lock is that the later one serves only as a semaphore so
- -- that do not check for ceiling violations.
-
- type Suspension_Object is limited private;
- -- Should be used for the implementation of Ada.Synchronous_Task_Control
-
- type Task_Body_Access is access procedure;
- -- Pointer to the task body's entry point (or possibly a wrapper
- -- declared local to the GNARL).
-
- type Private_Data is limited private;
- -- Any information that the GNULLI needs maintained on a per-task basis.
- -- A component of this type is guaranteed to be included in the
- -- Ada_Task_Control_Block.
-
- subtype Task_Address is System.Address;
- -- In some versions of Task_Primitives, notably for VMS, Task_Address is
- -- the short version of address defined in System.Aux_DEC. To avoid
- -- dragging Aux_DEC into tasking packages a tasking specific subtype is
- -- defined here.
-
- Task_Address_Size : constant := Standard'Address_Size;
- -- The size of Task_Address
-
- Alternate_Stack_Size : constant := 0;
- -- No alternate signal stack is used on this platform
-
-private
-
- type Lock is record
- Mutex : aliased System.OS_Interface.pthread_mutex_t;
- Ceiling : System.Any_Priority;
- Saved_Priority : System.Any_Priority;
- end record;
-
- type RTS_Lock is new System.OS_Interface.pthread_mutex_t;
-
- type Suspension_Object is record
- State : Boolean;
- pragma Atomic (State);
- -- Boolean that indicates whether the object is open. This field is
- -- marked Atomic to ensure that we can read its value without locking
- -- the access to the Suspension_Object.
-
- Waiting : Boolean;
- -- Flag showing if there is a task already suspended on this object
-
- L : aliased System.OS_Interface.pthread_mutex_t;
- -- Protection for ensuring mutual exclusion on the Suspension_Object
-
- CV : aliased System.OS_Interface.pthread_cond_t;
- -- Condition variable used to queue threads until condition is signaled
- end record;
-
- type Private_Data is record
- Thread : aliased System.OS_Interface.pthread_t;
- pragma Atomic (Thread);
- -- Thread field may be updated by two different threads of control.
- -- (See, Enter_Task and Create_Task in s-taprop.adb). They put the
- -- same value (thr_self value). We do not want to use lock on those
- -- operations and the only thing we have to make sure is that they
- -- are updated in atomic fashion.
-
- LWP : aliased System.Address;
- -- The purpose of this field is to provide a better tasking support on
- -- gdb. The order of the two first fields (Thread and LWP) is important.
- -- On targets where lwp is not relevant, this is equivalent to Thread.
-
- CV : aliased System.OS_Interface.pthread_cond_t;
-
- L : aliased RTS_Lock;
- -- Protection for all components is lock L
- end record;
-
-end System.Task_Primitives;
diff --git a/gcc/ada/s-tpopsp-rtems.adb b/gcc/ada/s-tpopsp-rtems.adb
index 1d672b95324..a0aec9ef745 100644
--- a/gcc/ada/s-tpopsp-rtems.adb
+++ b/gcc/ada/s-tpopsp-rtems.adb
@@ -14,21 +14,19 @@
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNARL; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index d8298e01227..1cc6f263be6 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,12 @@
+2012-12-03 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2012-12-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/55570
+ * c-common.c (check_user_alignment): Swap order of tests,
+ check TREE_CODE first.
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 04b973f6ebb..c351e39d269 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -6864,8 +6864,8 @@ check_user_alignment (const_tree align, bool allow_zero)
{
int i;
- if (!INTEGRAL_TYPE_P (TREE_TYPE (align))
- || TREE_CODE (align) != INTEGER_CST)
+ if (TREE_CODE (align) != INTEGER_CST
+ || !INTEGRAL_TYPE_P (TREE_TYPE (align)))
{
error ("requested alignment is not an integer constant");
return -1;
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 062a7346c2d..c6e82e5f066 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -694,6 +694,8 @@ update_alias_info_with_stack_vars (void)
(void *)(size_t) uid)) = part;
*((tree *) pointer_map_insert (cfun->gimple_df->decls_to_pointers,
decl)) = name;
+ if (TREE_ADDRESSABLE (decl))
+ TREE_ADDRESSABLE (name) = 1;
}
/* Make the SSA name point to all partition members. */
diff --git a/gcc/common.opt b/gcc/common.opt
index 369b02188d0..dbbec7ebfde 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2337,6 +2337,10 @@ fvar-tracking-assignments-toggle
Common Report Var(flag_var_tracking_assignments_toggle) Optimization
Toggle -fvar-tracking-assignments
+; Positive if we should track uninitialized variables, negative if
+; we should run the var-tracking pass only to discard debug
+; annotations. When flag_var_tracking_uninit == AUTODETECT_VALUE it
+; will be set according to flag_var_tracking.
fvar-tracking-uninit
Common Report Var(flag_var_tracking_uninit) Optimization
Perform variable tracking and also tag variables that are uninitialized
diff --git a/gcc/common/config/m68k/m68k-common.c b/gcc/common/config/m68k/m68k-common.c
index 3a81b678a24..55b3e4a59c2 100644
--- a/gcc/common/config/m68k/m68k-common.c
+++ b/gcc/common/config/m68k/m68k-common.c
@@ -1,6 +1,6 @@
/* Common hooks for Motorola 68000 family.
Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see
static bool
m68k_handle_option (struct gcc_options *opts,
- struct gcc_options *opts_set ATTRIBUTE_UNUSED,
+ struct gcc_options *opts_set,
const struct cl_decoded_option *decoded,
location_t loc)
{
@@ -45,12 +45,16 @@ m68k_handle_option (struct gcc_options *opts,
{
case OPT_m68020_40:
opts->x_m68k_tune_option = u68020_40;
+ opts_set->x_m68k_tune_option = (enum uarch_type) 1;
opts->x_m68k_cpu_option = m68020;
+ opts_set->x_m68k_cpu_option = (enum target_device) 1;
return true;
case OPT_m68020_60:
opts->x_m68k_tune_option = u68020_60;
+ opts_set->x_m68k_tune_option = (enum uarch_type) 1;
opts->x_m68k_cpu_option = m68020;
+ opts_set->x_m68k_cpu_option = (enum target_device) 1;
return true;
case OPT_mshared_library_id_:
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 22617958d28..c7452da6ccd 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1750,6 +1750,14 @@ microblaze*-linux*)
c_target_objs="${c_target_objs} microblaze-c.o"
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
;;
+microblaze*-*-rtems*)
+ tm_file="${tm_file} dbxelf.h"
+ tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
+ c_target_objs="${c_target_objs} microblaze-c.o"
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+ tmake_file="${tmake_file} microblaze/t-microblaze"
+ tmake_file="${tmake_file} t-rtems microblaze/t-rtems"
+ ;;
microblaze*-*-*)
tm_file="${tm_file} dbxelf.h"
c_target_objs="${c_target_objs} microblaze-c.o"
@@ -2437,7 +2445,7 @@ sparc-*-elf*)
;;
sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- tmake_file="sparc/t-sparc sparc/t-elf t-rtems"
+ tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
;;
sparc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
@@ -2490,7 +2498,7 @@ sparc64-*-elf*)
sparc64-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
extra_options="${extra_options}"
- tmake_file="${tmake_file} sparc/t-sparc t-rtems"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64 t-rtems"
;;
sparc64-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default-64.h sparc/linux64.h sparc/tso.h"
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index e8ff87989f9..e9dd3108b57 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -767,6 +767,9 @@ int arm_arch6 = 0;
/* Nonzero if this chip supports the ARM 6K extensions. */
int arm_arch6k = 0;
+/* Nonzero if instructions present in ARMv6-M can be used. */
+int arm_arch6m = 0;
+
/* Nonzero if this chip supports the ARM 7 extensions. */
int arm_arch7 = 0;
@@ -1726,6 +1729,7 @@ arm_option_override (void)
arm_arch6 = (insn_flags & FL_ARCH6) != 0;
arm_arch6k = (insn_flags & FL_ARCH6K) != 0;
arm_arch_notm = (insn_flags & FL_NOTM) != 0;
+ arm_arch6m = arm_arch6 && !arm_arch_notm;
arm_arch7 = (insn_flags & FL_ARCH7) != 0;
arm_arch7em = (insn_flags & FL_ARCH7EM) != 0;
arm_arch_thumb2 = (insn_flags & FL_THUMB2) != 0;
@@ -13359,6 +13363,13 @@ arm_reorg (void)
if (TARGET_THUMB2)
thumb2_reorg ();
+ /* Ensure all insns that must be split have been split at this point.
+ Otherwise, the pool placement code below may compute incorrect
+ insn lengths. Note that when optimizing, all insns have already
+ been split at this point. */
+ if (!optimize)
+ split_all_insns_noflow ();
+
minipool_fix_head = minipool_fix_tail = NULL;
/* The first insn must always be a note, or the code below won't
@@ -22329,12 +22340,18 @@ thumb1_expand_prologue (void)
{
unsigned pushable_regs;
unsigned next_hi_reg;
+ unsigned arg_regs_num = TARGET_AAPCS_BASED ? crtl->args.info.aapcs_ncrn
+ : crtl->args.info.nregs;
+ unsigned arg_regs_mask = (1 << arg_regs_num) - 1;
for (next_hi_reg = 12; next_hi_reg > LAST_LO_REGNUM; next_hi_reg--)
if (live_regs_mask & (1 << next_hi_reg))
break;
- pushable_regs = l_mask & 0xff;
+ /* Here we need to mask out registers used for passing arguments
+ even if they can be pushed. This is to avoid using them to stash the high
+ registers. Such kind of stash may clobber the use of arguments. */
+ pushable_regs = l_mask & (~arg_regs_mask) & 0xff;
if (pushable_regs == 0)
pushable_regs = 1 << thumb_find_work_register (live_regs_mask);
@@ -25094,8 +25111,8 @@ arm_expand_compare_and_swap (rtx operands[])
case SImode:
/* Force the value into a register if needed. We waited until after
the zero-extension above to do this properly. */
- if (!arm_add_operand (oldval, mode))
- oldval = force_reg (mode, oldval);
+ if (!arm_add_operand (oldval, SImode))
+ oldval = force_reg (SImode, oldval);
break;
case DImode:
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index e9b29d6e0cc..07dbf13e6cf 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -267,7 +267,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
#define TARGET_UNIFIED_ASM TARGET_THUMB2
/* Nonzero if this chip provides the DMB instruction. */
-#define TARGET_HAVE_DMB (arm_arch7)
+#define TARGET_HAVE_DMB (arm_arch6m || arm_arch7)
/* Nonzero if this chip implements a memory barrier via CP15. */
#define TARGET_HAVE_DMB_MCR (arm_arch6 && ! TARGET_HAVE_DMB \
@@ -383,6 +383,9 @@ extern int arm_arch6;
/* Nonzero if this chip supports the ARM Architecture 6k extensions. */
extern int arm_arch6k;
+/* Nonzero if instructions present in ARMv6-M can be used. */
+extern int arm_arch6m;
+
/* Nonzero if this chip supports the ARM Architecture 7 extensions. */
extern int arm_arch7;
diff --git a/gcc/config/avr/rtems.h b/gcc/config/avr/rtems.h
index efd8afacefa..4a9c1b4d67b 100644
--- a/gcc/config/avr/rtems.h
+++ b/gcc/config/avr/rtems.h
@@ -23,6 +23,5 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__rtems__"); \
- builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} while (0)
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index ba253dd7dbf..63684e3a02c 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3024,12 +3024,12 @@ darwin_override_options (void)
darwin_emit_branch_islands = true;
}
- if (flag_var_tracking
+ if (flag_var_tracking_uninit == 0
&& generating_for_darwin_version >= 9
&& (flag_gtoggle ? (debug_info_level == DINFO_LEVEL_NONE)
: (debug_info_level >= DINFO_LEVEL_NORMAL))
&& write_symbols == DWARF2_DEBUG)
- flag_var_tracking_uninit = 1;
+ flag_var_tracking_uninit = flag_var_tracking;
if (MACHO_DYNAMIC_NO_PIC_P)
{
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 38733f67f47..280022f75ad 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -280,7 +280,7 @@ struct ix86_address
};
extern int ix86_decompose_address (rtx, struct ix86_address *);
-extern int memory_address_length (rtx addr);
+extern int memory_address_length (rtx, bool);
extern void x86_output_aligned_bss (FILE *, tree, const char *,
unsigned HOST_WIDE_INT, int);
extern void x86_elf_aligned_common (FILE *, const char *,
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 252e81a45ea..e228308100f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9563,6 +9563,8 @@ get_scratch_register_on_entry (struct scratch_reg *sr)
tree decl = current_function_decl, fntype = TREE_TYPE (decl);
bool fastcall_p
= lookup_attribute ("fastcall", TYPE_ATTRIBUTES (fntype)) != NULL_TREE;
+ bool thiscall_p
+ = lookup_attribute ("thiscall", TYPE_ATTRIBUTES (fntype)) != NULL_TREE;
bool static_chain_p = DECL_STATIC_CHAIN (decl);
int regparm = ix86_function_regparm (fntype, decl);
int drap_regno
@@ -9573,10 +9575,15 @@ get_scratch_register_on_entry (struct scratch_reg *sr)
if ((regparm < 1 || (fastcall_p && !static_chain_p))
&& drap_regno != AX_REG)
regno = AX_REG;
- else if (regparm < 2 && drap_regno != DX_REG)
+ /* 'thiscall' sets regparm to 1, uses ecx for arguments and edx
+ for the static chain register. */
+ else if (thiscall_p && !static_chain_p && drap_regno != AX_REG)
+ regno = AX_REG;
+ else if (regparm < 2 && !thiscall_p && drap_regno != DX_REG)
regno = DX_REG;
/* ecx is the static chain register. */
- else if (regparm < 3 && !fastcall_p && !static_chain_p
+ else if (regparm < 3 && !fastcall_p && !thiscall_p
+ && !static_chain_p
&& drap_regno != CX_REG)
regno = CX_REG;
else if (ix86_save_reg (BX_REG, true))
@@ -9609,6 +9616,7 @@ release_scratch_register_on_entry (struct scratch_reg *sr)
{
if (sr->saved)
{
+ struct machine_function *m = cfun->machine;
rtx x, insn = emit_insn (gen_pop (sr->reg));
/* The RTX_FRAME_RELATED_P mechanism doesn't know about pop. */
@@ -9616,6 +9624,7 @@ release_scratch_register_on_entry (struct scratch_reg *sr)
x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (UNITS_PER_WORD));
x = gen_rtx_SET (VOIDmode, stack_pointer_rtx, x);
add_reg_note (insn, REG_FRAME_RELATED_EXPR, x);
+ m->fs.sp_offset -= UNITS_PER_WORD;
}
}
@@ -10344,7 +10353,7 @@ ix86_expand_prologue (void)
rtx eax = gen_rtx_REG (Pmode, AX_REG);
rtx r10 = NULL;
rtx (*adjust_stack_insn)(rtx, rtx, rtx);
-
+ const bool sp_is_cfa_reg = (m->fs.cfa_reg == stack_pointer_rtx);
bool eax_live = false;
bool r10_live = false;
@@ -10353,16 +10362,31 @@ ix86_expand_prologue (void)
if (!TARGET_64BIT_MS_ABI)
eax_live = ix86_eax_live_at_start_p ();
+ /* Note that SEH directives need to continue tracking the stack
+ pointer even after the frame pointer has been set up. */
if (eax_live)
{
- emit_insn (gen_push (eax));
+ insn = emit_insn (gen_push (eax));
allocate -= UNITS_PER_WORD;
+ if (sp_is_cfa_reg || TARGET_SEH)
+ {
+ if (sp_is_cfa_reg)
+ m->fs.cfa_offset += UNITS_PER_WORD;
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
}
+
if (r10_live)
{
r10 = gen_rtx_REG (Pmode, R10_REG);
- emit_insn (gen_push (r10));
+ insn = emit_insn (gen_push (r10));
allocate -= UNITS_PER_WORD;
+ if (sp_is_cfa_reg || TARGET_SEH)
+ {
+ if (sp_is_cfa_reg)
+ m->fs.cfa_offset += UNITS_PER_WORD;
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
}
emit_move_insn (eax, GEN_INT (allocate));
@@ -10376,13 +10400,10 @@ ix86_expand_prologue (void)
insn = emit_insn (adjust_stack_insn (stack_pointer_rtx,
stack_pointer_rtx, eax));
- /* Note that SEH directives need to continue tracking the stack
- pointer even after the frame pointer has been set up. */
- if (m->fs.cfa_reg == stack_pointer_rtx || TARGET_SEH)
+ if (sp_is_cfa_reg || TARGET_SEH)
{
- if (m->fs.cfa_reg == stack_pointer_rtx)
+ if (sp_is_cfa_reg)
m->fs.cfa_offset += allocate;
-
RTX_FRAME_RELATED_P (insn) = 1;
add_reg_note (insn, REG_FRAME_RELATED_EXPR,
gen_rtx_SET (VOIDmode, stack_pointer_rtx,
@@ -11298,12 +11319,15 @@ split_stack_prologue_scratch_regno (void)
return R11_REG;
else
{
- bool is_fastcall;
+ bool is_fastcall, is_thiscall;
int regparm;
is_fastcall = (lookup_attribute ("fastcall",
TYPE_ATTRIBUTES (TREE_TYPE (cfun->decl)))
!= NULL);
+ is_thiscall = (lookup_attribute ("thiscall",
+ TYPE_ATTRIBUTES (TREE_TYPE (cfun->decl)))
+ != NULL);
regparm = ix86_function_regparm (TREE_TYPE (cfun->decl), cfun->decl);
if (is_fastcall)
@@ -11316,6 +11340,12 @@ split_stack_prologue_scratch_regno (void)
}
return AX_REG;
}
+ else if (is_thiscall)
+ {
+ if (!DECL_STATIC_CHAIN (cfun->decl))
+ return DX_REG;
+ return AX_REG;
+ }
else if (regparm < 3)
{
if (!DECL_STATIC_CHAIN (cfun->decl))
@@ -11631,10 +11661,6 @@ ix86_address_subreg_operand (rtx op)
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
return false;
- /* simplify_subreg does not handle stack pointer. */
- if (REGNO (op) == STACK_POINTER_REGNUM)
- return false;
-
/* Allow only SUBREGs of non-eliminable hard registers. */
return register_no_elim_operand (op, mode);
}
@@ -12549,7 +12575,6 @@ legitimize_pic_address (rtx orig, rtx reg)
{
rtx addr = orig;
rtx new_rtx = orig;
- rtx base;
#if TARGET_MACHO
if (TARGET_MACHO && !TARGET_64BIT)
@@ -12754,20 +12779,33 @@ legitimize_pic_address (rtx orig, rtx reg)
}
else
{
- base = legitimize_pic_address (XEXP (addr, 0), reg);
- new_rtx = legitimize_pic_address (XEXP (addr, 1),
- base == reg ? NULL_RTX : reg);
+ rtx base = legitimize_pic_address (op0, reg);
+ enum machine_mode mode = GET_MODE (base);
+ new_rtx
+ = legitimize_pic_address (op1, base == reg ? NULL_RTX : reg);
if (CONST_INT_P (new_rtx))
- new_rtx = plus_constant (base, INTVAL (new_rtx));
+ {
+ if (INTVAL (new_rtx) < -16*1024*1024
+ || INTVAL (new_rtx) >= 16*1024*1024)
+ {
+ if (!x86_64_immediate_operand (new_rtx, mode))
+ new_rtx = force_reg (mode, new_rtx);
+ new_rtx
+ = gen_rtx_PLUS (mode, force_reg (mode, base), new_rtx);
+ }
+ else
+ new_rtx = plus_constant (base, INTVAL (new_rtx));
+ }
else
{
- if (GET_CODE (new_rtx) == PLUS && CONSTANT_P (XEXP (new_rtx, 1)))
+ if (GET_CODE (new_rtx) == PLUS
+ && CONSTANT_P (XEXP (new_rtx, 1)))
{
- base = gen_rtx_PLUS (Pmode, base, XEXP (new_rtx, 0));
+ base = gen_rtx_PLUS (mode, base, XEXP (new_rtx, 0));
new_rtx = XEXP (new_rtx, 1);
}
- new_rtx = gen_rtx_PLUS (Pmode, base, new_rtx);
+ new_rtx = gen_rtx_PLUS (mode, base, new_rtx);
}
}
}
@@ -12866,6 +12904,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
tp = get_thread_pointer (true);
dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest));
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
}
else
@@ -12874,13 +12915,17 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
if (TARGET_64BIT)
{
- rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
+ rtx rax = gen_rtx_REG (Pmode, AX_REG);
+ rtx insns;
start_sequence ();
emit_call_insn (gen_tls_global_dynamic_64 (rax, x, caddr));
insns = get_insns ();
end_sequence ();
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
RTL_CONST_CALL_P (insns) = 1;
emit_libcall_block (insns, dest, rax, x);
}
@@ -12922,7 +12967,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
if (TARGET_64BIT)
{
- rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
+ rtx rax = gen_rtx_REG (Pmode, AX_REG);
+ rtx insns, eqv;
start_sequence ();
emit_call_insn (gen_tls_local_dynamic_base_64 (rax, caddr));
@@ -12950,6 +12996,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
{
dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, dest, tp));
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
}
break;
@@ -13909,15 +13958,9 @@ void
print_reg (rtx x, int code, FILE *file)
{
const char *reg;
+ unsigned int regno;
bool duplicated = code == 'd' && TARGET_AVX;
- gcc_assert (x == pc_rtx
- || (REGNO (x) != ARG_POINTER_REGNUM
- && REGNO (x) != FRAME_POINTER_REGNUM
- && REGNO (x) != FLAGS_REG
- && REGNO (x) != FPSR_REG
- && REGNO (x) != FPCR_REG));
-
if (ASSEMBLER_DIALECT == ASM_ATT)
putc ('%', file);
@@ -13928,6 +13971,13 @@ print_reg (rtx x, int code, FILE *file)
return;
}
+ regno = true_regnum (x);
+ gcc_assert (regno != ARG_POINTER_REGNUM
+ && regno != FRAME_POINTER_REGNUM
+ && regno != FLAGS_REG
+ && regno != FPSR_REG
+ && regno != FPCR_REG);
+
if (code == 'w' || MMX_REG_P (x))
code = 2;
else if (code == 'b')
@@ -13949,11 +13999,11 @@ print_reg (rtx x, int code, FILE *file)
/* Irritatingly, AMD extended registers use different naming convention
from the normal registers: "r%d[bwd]" */
- if (REX_INT_REG_P (x))
+ if (REX_INT_REGNO_P (regno))
{
gcc_assert (TARGET_64BIT);
putc ('r', file);
- fprint_ul (file, REGNO (x) - FIRST_REX_INT_REG + 8);
+ fprint_ul (file, regno - FIRST_REX_INT_REG + 8);
switch (code)
{
case 0:
@@ -13997,24 +14047,24 @@ print_reg (rtx x, int code, FILE *file)
case 16:
case 2:
normal:
- reg = hi_reg_name[REGNO (x)];
+ reg = hi_reg_name[regno];
break;
case 1:
- if (REGNO (x) >= ARRAY_SIZE (qi_reg_name))
+ if (regno >= ARRAY_SIZE (qi_reg_name))
goto normal;
- reg = qi_reg_name[REGNO (x)];
+ reg = qi_reg_name[regno];
break;
case 0:
- if (REGNO (x) >= ARRAY_SIZE (qi_high_reg_name))
+ if (regno >= ARRAY_SIZE (qi_high_reg_name))
goto normal;
- reg = qi_high_reg_name[REGNO (x)];
+ reg = qi_high_reg_name[regno];
break;
case 32:
if (SSE_REG_P (x))
{
gcc_assert (!duplicated);
putc ('y', file);
- fputs (hi_reg_name[REGNO (x)] + 1, file);
+ fputs (hi_reg_name[regno] + 1, file);
return;
}
break;
@@ -14789,22 +14839,6 @@ ix86_print_operand_address (FILE *file, rtx addr)
gcc_assert (ok);
- if (parts.base && GET_CODE (parts.base) == SUBREG)
- {
- rtx tmp = SUBREG_REG (parts.base);
- parts.base = simplify_subreg (GET_MODE (parts.base),
- tmp, GET_MODE (tmp), 0);
- gcc_assert (parts.base != NULL_RTX);
- }
-
- if (parts.index && GET_CODE (parts.index) == SUBREG)
- {
- rtx tmp = SUBREG_REG (parts.index);
- parts.index = simplify_subreg (GET_MODE (parts.index),
- tmp, GET_MODE (tmp), 0);
- gcc_assert (parts.index != NULL_RTX);
- }
-
base = parts.base;
index = parts.index;
disp = parts.disp;
@@ -14857,21 +14891,49 @@ ix86_print_operand_address (FILE *file, rtx addr)
else
{
/* Print SImode register names to force addr32 prefix. */
- if (GET_CODE (addr) == SUBREG)
- {
- gcc_assert (TARGET_64BIT);
- gcc_assert (GET_MODE (addr) == SImode);
- gcc_assert (GET_MODE (SUBREG_REG (addr)) == DImode);
- gcc_assert (!code);
- code = 'l';
- }
- else if (GET_CODE (addr) == ZERO_EXTEND
- || GET_CODE (addr) == AND)
+ if (SImode_address_operand (addr, VOIDmode))
{
+#ifdef ENABLE_CHECKING
gcc_assert (TARGET_64BIT);
- gcc_assert (GET_MODE (addr) == DImode);
+ switch (GET_CODE (addr))
+ {
+ case SUBREG:
+ gcc_assert (GET_MODE (addr) == SImode);
+ gcc_assert (GET_MODE (SUBREG_REG (addr)) == DImode);
+ break;
+ case ZERO_EXTEND:
+ case AND:
+ gcc_assert (GET_MODE (addr) == DImode);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+#endif
gcc_assert (!code);
- code = 'l';
+ code = 'k';
+ }
+ else if (code == 0
+ && TARGET_X32
+ && disp
+ && CONST_INT_P (disp)
+ && INTVAL (disp) < -16*1024*1024)
+ {
+ /* X32 runs in 64-bit mode, where displacement, DISP, in
+ address DISP(%r64), is encoded as 32-bit immediate sign-
+ extended from 32-bit to 64-bit. For -0x40000300(%r64),
+ address is %r64 + 0xffffffffbffffd00. When %r64 <
+ 0x40000300, like 0x37ffe064, address is 0xfffffffff7ffdd64,
+ which is invalid for x32. The correct address is %r64
+ - 0x40000300 == 0xf7ffdd64. To properly encode
+ -0x40000300(%r64) for x32, we zero-extend negative
+ displacement by forcing addr32 prefix which truncates
+ 0xfffffffff7ffdd64 to 0xf7ffdd64. In theory, we should
+ zero-extend all negative displacements, including -1(%rsp).
+ However, for small negative displacements, sign-extension
+ won't cause overflow. We only zero-extend negative
+ displacements if they < -16*1024*1024, which is also used
+ to check legitimate address displacements for PIC. */
+ code = 'k';
}
if (ASSEMBLER_DIALECT == ASM_ATT)
@@ -15937,7 +15999,8 @@ ix86_avx256_split_vector_move_misalign (rtx op0, rtx op1)
{
rtx m;
rtx (*extract) (rtx, rtx, rtx);
- rtx (*move_unaligned) (rtx, rtx);
+ rtx (*load_unaligned) (rtx, rtx);
+ rtx (*store_unaligned) (rtx, rtx);
enum machine_mode mode;
switch (GET_MODE (op0))
@@ -15946,39 +16009,52 @@ ix86_avx256_split_vector_move_misalign (rtx op0, rtx op1)
gcc_unreachable ();
case V32QImode:
extract = gen_avx_vextractf128v32qi;
- move_unaligned = gen_avx_movdqu256;
+ load_unaligned = gen_avx_loaddqu256;
+ store_unaligned = gen_avx_storedqu256;
mode = V16QImode;
break;
case V8SFmode:
extract = gen_avx_vextractf128v8sf;
- move_unaligned = gen_avx_movups256;
+ load_unaligned = gen_avx_loadups256;
+ store_unaligned = gen_avx_storeups256;
mode = V4SFmode;
break;
case V4DFmode:
extract = gen_avx_vextractf128v4df;
- move_unaligned = gen_avx_movupd256;
+ load_unaligned = gen_avx_loadupd256;
+ store_unaligned = gen_avx_storeupd256;
mode = V2DFmode;
break;
}
- if (MEM_P (op1) && TARGET_AVX256_SPLIT_UNALIGNED_LOAD)
+ if (MEM_P (op1))
{
- rtx r = gen_reg_rtx (mode);
- m = adjust_address (op1, mode, 0);
- emit_move_insn (r, m);
- m = adjust_address (op1, mode, 16);
- r = gen_rtx_VEC_CONCAT (GET_MODE (op0), r, m);
- emit_move_insn (op0, r);
+ if (TARGET_AVX256_SPLIT_UNALIGNED_LOAD)
+ {
+ rtx r = gen_reg_rtx (mode);
+ m = adjust_address (op1, mode, 0);
+ emit_move_insn (r, m);
+ m = adjust_address (op1, mode, 16);
+ r = gen_rtx_VEC_CONCAT (GET_MODE (op0), r, m);
+ emit_move_insn (op0, r);
+ }
+ else
+ emit_insn (load_unaligned (op0, op1));
}
- else if (MEM_P (op0) && TARGET_AVX256_SPLIT_UNALIGNED_STORE)
+ else if (MEM_P (op0))
{
- m = adjust_address (op0, mode, 0);
- emit_insn (extract (m, op1, const0_rtx));
- m = adjust_address (op0, mode, 16);
- emit_insn (extract (m, op1, const1_rtx));
+ if (TARGET_AVX256_SPLIT_UNALIGNED_STORE)
+ {
+ m = adjust_address (op0, mode, 0);
+ emit_insn (extract (m, op1, const0_rtx));
+ m = adjust_address (op0, mode, 16);
+ emit_insn (extract (m, op1, const1_rtx));
+ }
+ else
+ emit_insn (store_unaligned (op0, op1));
}
else
- emit_insn (move_unaligned (op0, op1));
+ gcc_unreachable ();
}
/* Implement the movmisalign patterns for SSE. Non-SSE modes go
@@ -16037,6 +16113,7 @@ void
ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
rtx op0, op1, m;
+ rtx (*move_unaligned) (rtx, rtx);
op0 = operands[0];
op1 = operands[1];
@@ -16053,14 +16130,28 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
/* If we're optimizing for size, movups is the smallest. */
if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL)
{
+ if (MEM_P (op1))
+ move_unaligned = gen_sse_loadups;
+ else if (MEM_P (op0))
+ move_unaligned = gen_sse_storeups;
+ else
+ gcc_unreachable ();
+
op0 = gen_lowpart (V4SFmode, op0);
op1 = gen_lowpart (V4SFmode, op1);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (move_unaligned (op0, op1));
return;
}
+ if (MEM_P (op1))
+ move_unaligned = gen_sse2_loaddqu;
+ else if (MEM_P (op0))
+ move_unaligned = gen_sse2_storedqu;
+ else
+ gcc_unreachable ();
+
op0 = gen_lowpart (V16QImode, op0);
op1 = gen_lowpart (V16QImode, op1);
- emit_insn (gen_sse2_movdqu (op0, op1));
+ emit_insn (move_unaligned (op0, op1));
break;
case 32:
op0 = gen_lowpart (V32QImode, op0);
@@ -16078,7 +16169,14 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
switch (mode)
{
case V4SFmode:
- emit_insn (gen_sse_movups (op0, op1));
+ if (MEM_P (op1))
+ move_unaligned = gen_sse_loadups;
+ else if (MEM_P (op0))
+ move_unaligned = gen_sse_storeups;
+ else
+ gcc_unreachable ();
+
+ emit_insn (move_unaligned (op0, op1));
break;
case V8SFmode:
ix86_avx256_split_vector_move_misalign (op0, op1);
@@ -16086,12 +16184,26 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
case V2DFmode:
if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL)
{
+ if (MEM_P (op1))
+ move_unaligned = gen_sse_loadups;
+ else if (MEM_P (op0))
+ move_unaligned = gen_sse_storeups;
+ else
+ gcc_unreachable ();
+
op0 = gen_lowpart (V4SFmode, op0);
op1 = gen_lowpart (V4SFmode, op1);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (move_unaligned (op0, op1));
return;
}
- emit_insn (gen_sse2_movupd (op0, op1));
+ if (MEM_P (op1))
+ move_unaligned = gen_sse2_loadupd;
+ else if (MEM_P (op0))
+ move_unaligned = gen_sse2_storeupd;
+ else
+ gcc_unreachable ();
+
+ emit_insn (move_unaligned (op0, op1));
break;
case V4DFmode:
ix86_avx256_split_vector_move_misalign (op0, op1);
@@ -16116,7 +16228,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V4SFmode, op0);
op1 = gen_lowpart (V4SFmode, op1);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (gen_sse_loadups (op0, op1));
return;
}
@@ -16127,7 +16239,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V16QImode, op0);
op1 = gen_lowpart (V16QImode, op1);
- emit_insn (gen_sse2_movdqu (op0, op1));
+ emit_insn (gen_sse2_loaddqu (op0, op1));
return;
}
@@ -16139,7 +16251,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V2DFmode, op0);
op1 = gen_lowpart (V2DFmode, op1);
- emit_insn (gen_sse2_movupd (op0, op1));
+ emit_insn (gen_sse2_loadupd (op0, op1));
return;
}
@@ -16174,7 +16286,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V4SFmode, op0);
op1 = gen_lowpart (V4SFmode, op1);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (gen_sse_loadups (op0, op1));
return;
}
@@ -16199,7 +16311,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V4SFmode, op0);
op1 = gen_lowpart (V4SFmode, op1);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (gen_sse_storeups (op0, op1));
return;
}
@@ -16210,7 +16322,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V16QImode, op0);
op1 = gen_lowpart (V16QImode, op1);
- emit_insn (gen_sse2_movdqu (op0, op1));
+ emit_insn (gen_sse2_storedqu (op0, op1));
return;
}
@@ -16220,7 +16332,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
{
op0 = gen_lowpart (V2DFmode, op0);
op1 = gen_lowpart (V2DFmode, op1);
- emit_insn (gen_sse2_movupd (op0, op1));
+ emit_insn (gen_sse2_storeupd (op0, op1));
}
else
{
@@ -16238,7 +16350,7 @@ ix86_expand_vector_move_misalign (enum machine_mode mode, rtx operands[])
if (TARGET_SSE_UNALIGNED_STORE_OPTIMAL)
{
op0 = gen_lowpart (V4SFmode, op0);
- emit_insn (gen_sse_movups (op0, op1));
+ emit_insn (gen_sse_storeups (op0, op1));
}
else
{
@@ -23513,7 +23625,6 @@ ix86_init_machine_status (void)
f = ggc_alloc_cleared_machine_function ();
f->use_fast_prologue_epilogue_nregs = -1;
- f->tls_descriptor_call_expanded_p = 0;
f->call_abi = ix86_abi;
return f;
@@ -23532,9 +23643,6 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
gcc_assert (n < MAX_386_STACK_LOCALS);
- /* Virtual slot is valid only before vregs are instantiated. */
- gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated);
-
for (s = ix86_stack_locals; s; s = s->next)
if (s->mode == mode && s->n == n)
return validize_mem (copy_rtx (s->rtl));
@@ -23548,13 +23656,23 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
ix86_stack_locals = s;
return validize_mem (s->rtl);
}
+
+static void
+ix86_instantiate_decls (void)
+{
+ struct stack_local_entry *s;
+
+ for (s = ix86_stack_locals; s; s = s->next)
+ if (s->rtl != NULL_RTX)
+ instantiate_decl_rtl (s->rtl);
+}
/* Calculate the length of the memory address in the instruction encoding.
Includes addr32 prefix, does not include the one-byte modrm, opcode,
- or other prefixes. */
+ or other prefixes. We never generate addr32 prefix for LEA insn. */
int
-memory_address_length (rtx addr)
+memory_address_length (rtx addr, bool lea)
{
struct ix86_address parts;
rtx base, index, disp;
@@ -23570,18 +23688,26 @@ memory_address_length (rtx addr)
ok = ix86_decompose_address (addr, &parts);
gcc_assert (ok);
- if (parts.base && GET_CODE (parts.base) == SUBREG)
- parts.base = SUBREG_REG (parts.base);
- if (parts.index && GET_CODE (parts.index) == SUBREG)
- parts.index = SUBREG_REG (parts.index);
+ len = (parts.seg == SEG_DEFAULT) ? 0 : 1;
+
+ /* If this is not LEA instruction, add the length of addr32 prefix. */
+ if (TARGET_64BIT && !lea
+ && (SImode_address_operand (addr, VOIDmode)
+ || (parts.base && GET_MODE (parts.base) == SImode)
+ || (parts.index && GET_MODE (parts.index) == SImode)))
+ len++;
base = parts.base;
index = parts.index;
disp = parts.disp;
- /* Add length of addr32 prefix. */
- len = (GET_CODE (addr) == ZERO_EXTEND
- || GET_CODE (addr) == AND);
+ if (base && GET_CODE (base) == SUBREG)
+ base = SUBREG_REG (base);
+ if (index && GET_CODE (index) == SUBREG)
+ index = SUBREG_REG (index);
+
+ gcc_assert (base == NULL_RTX || REG_P (base));
+ gcc_assert (index == NULL_RTX || REG_P (index));
/* Rule of thumb:
- esp as the base always wants an index,
@@ -23595,14 +23721,13 @@ memory_address_length (rtx addr)
/* esp (for its index) and ebp (for its displacement) need
the two-byte modrm form. Similarly for r12 and r13 in 64-bit
code. */
- if (REG_P (addr)
- && (addr == arg_pointer_rtx
- || addr == frame_pointer_rtx
- || REGNO (addr) == SP_REG
- || REGNO (addr) == BP_REG
- || REGNO (addr) == R12_REG
- || REGNO (addr) == R13_REG))
- len = 1;
+ if (base == arg_pointer_rtx
+ || base == frame_pointer_rtx
+ || REGNO (base) == SP_REG
+ || REGNO (base) == BP_REG
+ || REGNO (base) == R12_REG
+ || REGNO (base) == R13_REG)
+ len++;
}
/* Direct Addressing. In 64-bit mode mod 00 r/m 5
@@ -23612,7 +23737,7 @@ memory_address_length (rtx addr)
by UNSPEC. */
else if (disp && !base && !index)
{
- len = 4;
+ len += 4;
if (TARGET_64BIT)
{
rtx symbol = disp;
@@ -23630,43 +23755,30 @@ memory_address_length (rtx addr)
|| (XINT (symbol, 1) != UNSPEC_GOTPCREL
&& XINT (symbol, 1) != UNSPEC_PCREL
&& XINT (symbol, 1) != UNSPEC_GOTNTPOFF)))
- len += 1;
+ len++;
}
}
-
else
{
/* Find the length of the displacement constant. */
if (disp)
{
if (base && satisfies_constraint_K (disp))
- len = 1;
+ len += 1;
else
- len = 4;
+ len += 4;
}
/* ebp always wants a displacement. Similarly r13. */
- else if (base && REG_P (base)
- && (REGNO (base) == BP_REG || REGNO (base) == R13_REG))
- len = 1;
+ else if (base && (REGNO (base) == BP_REG || REGNO (base) == R13_REG))
+ len++;
/* An index requires the two-byte modrm form.... */
if (index
/* ...like esp (or r12), which always wants an index. */
|| base == arg_pointer_rtx
|| base == frame_pointer_rtx
- || (base && REG_P (base)
- && (REGNO (base) == SP_REG || REGNO (base) == R12_REG)))
- len += 1;
- }
-
- switch (parts.seg)
- {
- case SEG_FS:
- case SEG_GS:
- len += 1;
- break;
- default:
- break;
+ || (base && (REGNO (base) == SP_REG || REGNO (base) == R12_REG)))
+ len++;
}
return len;
@@ -23720,7 +23832,8 @@ ix86_attr_length_immediate_default (rtx insn, bool shortform)
case MODE_SI:
len = 4;
break;
- /* Immediates for DImode instructions are encoded as 32bit sign extended values. */
+ /* Immediates for DImode instructions are encoded
+ as 32bit sign extended values. */
case MODE_DI:
len = 4;
break;
@@ -23730,6 +23843,7 @@ ix86_attr_length_immediate_default (rtx insn, bool shortform)
}
return len;
}
+
/* Compute default value for "length_address" attribute. */
int
ix86_attr_length_address_default (rtx insn)
@@ -23746,15 +23860,8 @@ ix86_attr_length_address_default (rtx insn)
gcc_assert (GET_CODE (set) == SET);
addr = SET_SRC (set);
- if (TARGET_64BIT && get_attr_mode (insn) == MODE_SI)
- {
- if (GET_CODE (addr) == ZERO_EXTEND)
- addr = XEXP (addr, 0);
- if (GET_CODE (addr) == SUBREG)
- addr = SUBREG_REG (addr);
- }
- return memory_address_length (addr);
+ return memory_address_length (addr, true);
}
extract_insn_cached (insn);
@@ -23776,7 +23883,7 @@ ix86_attr_length_address_default (rtx insn)
if (*constraints == 'X')
continue;
}
- return memory_address_length (XEXP (recog_data.operand[i], 0));
+ return memory_address_length (XEXP (recog_data.operand[i], 0), false);
}
return 0;
}
@@ -24611,7 +24718,7 @@ ix86_static_chain (const_tree fndecl, bool incoming_p)
fntype = TREE_TYPE (fndecl);
ccvt = ix86_get_callcvt (fntype);
- if ((ccvt & (IX86_CALLCVT_FASTCALL | IX86_CALLCVT_THISCALL)) != 0)
+ if ((ccvt & IX86_CALLCVT_FASTCALL) != 0)
{
/* Fastcall functions use ecx/edx for arguments, which leaves
us with EAX for the static chain.
@@ -24619,6 +24726,13 @@ ix86_static_chain (const_tree fndecl, bool incoming_p)
leaves us with EAX for the static chain. */
regno = AX_REG;
}
+ else if ((ccvt & IX86_CALLCVT_THISCALL) != 0)
+ {
+ /* Thiscall functions use ecx for arguments, which leaves
+ us with EAX and EDX for the static chain.
+ We are using for abi-compatibility EAX. */
+ regno = AX_REG;
+ }
else if (ix86_function_regparm (fntype, fndecl) == 3)
{
/* For regparm 3, we have no free call-clobbered registers in
@@ -26247,9 +26361,9 @@ static const struct builtin_description bdesc_special_args[] =
{ OPTION_MASK_ISA_3DNOW, CODE_FOR_mmx_femms, "__builtin_ia32_femms", IX86_BUILTIN_FEMMS, UNKNOWN, (int) VOID_FTYPE_VOID },
/* SSE */
- { OPTION_MASK_ISA_SSE, CODE_FOR_sse_movups, "__builtin_ia32_storeups", IX86_BUILTIN_STOREUPS, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V4SF },
+ { OPTION_MASK_ISA_SSE, CODE_FOR_sse_storeups, "__builtin_ia32_storeups", IX86_BUILTIN_STOREUPS, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V4SF },
{ OPTION_MASK_ISA_SSE, CODE_FOR_sse_movntv4sf, "__builtin_ia32_movntps", IX86_BUILTIN_MOVNTPS, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V4SF },
- { OPTION_MASK_ISA_SSE, CODE_FOR_sse_movups, "__builtin_ia32_loadups", IX86_BUILTIN_LOADUPS, UNKNOWN, (int) V4SF_FTYPE_PCFLOAT },
+ { OPTION_MASK_ISA_SSE, CODE_FOR_sse_loadups, "__builtin_ia32_loadups", IX86_BUILTIN_LOADUPS, UNKNOWN, (int) V4SF_FTYPE_PCFLOAT },
{ OPTION_MASK_ISA_SSE, CODE_FOR_sse_loadhps_exp, "__builtin_ia32_loadhps", IX86_BUILTIN_LOADHPS, UNKNOWN, (int) V4SF_FTYPE_V4SF_PCV2SF },
{ OPTION_MASK_ISA_SSE, CODE_FOR_sse_loadlps_exp, "__builtin_ia32_loadlps", IX86_BUILTIN_LOADLPS, UNKNOWN, (int) V4SF_FTYPE_V4SF_PCV2SF },
@@ -26263,14 +26377,14 @@ static const struct builtin_description bdesc_special_args[] =
/* SSE2 */
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_lfence, "__builtin_ia32_lfence", IX86_BUILTIN_LFENCE, UNKNOWN, (int) VOID_FTYPE_VOID },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_mfence, 0, IX86_BUILTIN_MFENCE, UNKNOWN, (int) VOID_FTYPE_VOID },
- { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movupd, "__builtin_ia32_storeupd", IX86_BUILTIN_STOREUPD, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V2DF },
- { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movdqu, "__builtin_ia32_storedqu", IX86_BUILTIN_STOREDQU, UNKNOWN, (int) VOID_FTYPE_PCHAR_V16QI },
+ { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_storeupd, "__builtin_ia32_storeupd", IX86_BUILTIN_STOREUPD, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V2DF },
+ { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_storedqu, "__builtin_ia32_storedqu", IX86_BUILTIN_STOREDQU, UNKNOWN, (int) VOID_FTYPE_PCHAR_V16QI },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movntv2df, "__builtin_ia32_movntpd", IX86_BUILTIN_MOVNTPD, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V2DF },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movntv2di, "__builtin_ia32_movntdq", IX86_BUILTIN_MOVNTDQ, UNKNOWN, (int) VOID_FTYPE_PV2DI_V2DI },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movntisi, "__builtin_ia32_movnti", IX86_BUILTIN_MOVNTI, UNKNOWN, (int) VOID_FTYPE_PINT_INT },
{ OPTION_MASK_ISA_SSE2 | OPTION_MASK_ISA_64BIT, CODE_FOR_sse2_movntidi, "__builtin_ia32_movnti64", IX86_BUILTIN_MOVNTI64, UNKNOWN, (int) VOID_FTYPE_PLONGLONG_LONGLONG },
- { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movupd, "__builtin_ia32_loadupd", IX86_BUILTIN_LOADUPD, UNKNOWN, (int) V2DF_FTYPE_PCDOUBLE },
- { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_movdqu, "__builtin_ia32_loaddqu", IX86_BUILTIN_LOADDQU, UNKNOWN, (int) V16QI_FTYPE_PCCHAR },
+ { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_loadupd, "__builtin_ia32_loadupd", IX86_BUILTIN_LOADUPD, UNKNOWN, (int) V2DF_FTYPE_PCDOUBLE },
+ { OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_loaddqu, "__builtin_ia32_loaddqu", IX86_BUILTIN_LOADDQU, UNKNOWN, (int) V16QI_FTYPE_PCCHAR },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_loadhpd_exp, "__builtin_ia32_loadhpd", IX86_BUILTIN_LOADHPD, UNKNOWN, (int) V2DF_FTYPE_V2DF_PCDOUBLE },
{ OPTION_MASK_ISA_SSE2, CODE_FOR_sse2_loadlpd_exp, "__builtin_ia32_loadlpd", IX86_BUILTIN_LOADLPD, UNKNOWN, (int) V2DF_FTYPE_V2DF_PCDOUBLE },
@@ -26295,12 +26409,12 @@ static const struct builtin_description bdesc_special_args[] =
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_vbroadcastf128_v4df, "__builtin_ia32_vbroadcastf128_pd256", IX86_BUILTIN_VBROADCASTPD256, UNKNOWN, (int) V4DF_FTYPE_PCV2DF },
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_vbroadcastf128_v8sf, "__builtin_ia32_vbroadcastf128_ps256", IX86_BUILTIN_VBROADCASTPS256, UNKNOWN, (int) V8SF_FTYPE_PCV4SF },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movupd256, "__builtin_ia32_loadupd256", IX86_BUILTIN_LOADUPD256, UNKNOWN, (int) V4DF_FTYPE_PCDOUBLE },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movups256, "__builtin_ia32_loadups256", IX86_BUILTIN_LOADUPS256, UNKNOWN, (int) V8SF_FTYPE_PCFLOAT },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movupd256, "__builtin_ia32_storeupd256", IX86_BUILTIN_STOREUPD256, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V4DF },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movups256, "__builtin_ia32_storeups256", IX86_BUILTIN_STOREUPS256, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V8SF },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movdqu256, "__builtin_ia32_loaddqu256", IX86_BUILTIN_LOADDQU256, UNKNOWN, (int) V32QI_FTYPE_PCCHAR },
- { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movdqu256, "__builtin_ia32_storedqu256", IX86_BUILTIN_STOREDQU256, UNKNOWN, (int) VOID_FTYPE_PCHAR_V32QI },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_loadupd256, "__builtin_ia32_loadupd256", IX86_BUILTIN_LOADUPD256, UNKNOWN, (int) V4DF_FTYPE_PCDOUBLE },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_loadups256, "__builtin_ia32_loadups256", IX86_BUILTIN_LOADUPS256, UNKNOWN, (int) V8SF_FTYPE_PCFLOAT },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_storeupd256, "__builtin_ia32_storeupd256", IX86_BUILTIN_STOREUPD256, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V4DF },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_storeups256, "__builtin_ia32_storeups256", IX86_BUILTIN_STOREUPS256, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V8SF },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_loaddqu256, "__builtin_ia32_loaddqu256", IX86_BUILTIN_LOADDQU256, UNKNOWN, (int) V32QI_FTYPE_PCCHAR },
+ { OPTION_MASK_ISA_AVX, CODE_FOR_avx_storedqu256, "__builtin_ia32_storedqu256", IX86_BUILTIN_STOREDQU256, UNKNOWN, (int) VOID_FTYPE_PCHAR_V32QI },
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_lddqu256, "__builtin_ia32_lddqu256", IX86_BUILTIN_LDDQU256, UNKNOWN, (int) V32QI_FTYPE_PCCHAR },
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_movntv4di, "__builtin_ia32_movntdq256", IX86_BUILTIN_MOVNTDQ256, UNKNOWN, (int) VOID_FTYPE_PV4DI_V4DI },
@@ -29981,13 +30095,13 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
case IX86_BUILTIN_LDMXCSR:
op0 = expand_normal (CALL_EXPR_ARG (exp, 0));
- target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
+ target = assign_386_stack_local (SImode, SLOT_TEMP);
emit_move_insn (target, op0);
emit_insn (gen_sse_ldmxcsr (target));
return 0;
case IX86_BUILTIN_STMXCSR:
- target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
+ target = assign_386_stack_local (SImode, SLOT_TEMP);
emit_insn (gen_sse_stmxcsr (target));
return copy_to_mode_reg (SImode, target);
@@ -32782,8 +32896,10 @@ x86_output_mi_thunk (FILE *file,
else
{
unsigned int ccvt = ix86_get_callcvt (TREE_TYPE (function));
- if ((ccvt & (IX86_CALLCVT_FASTCALL | IX86_CALLCVT_THISCALL)) != 0)
+ if ((ccvt & IX86_CALLCVT_FASTCALL) != 0)
tmp_regno = AX_REG;
+ else if ((ccvt & IX86_CALLCVT_THISCALL) != 0)
+ tmp_regno = DX_REG;
else
tmp_regno = CX_REG;
}
@@ -39497,6 +39613,9 @@ ix86_autovectorize_vector_sizes (void)
#undef TARGET_PROMOTE_FUNCTION_MODE
#define TARGET_PROMOTE_FUNCTION_MODE ix86_promote_function_mode
+#undef TARGET_INSTANTIATE_DECLS
+#define TARGET_INSTANTIATE_DECLS ix86_instantiate_decls
+
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD ix86_secondary_reload
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 0e539c1dde9..e6e5b4681c0 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2116,8 +2116,7 @@ enum ix86_entity
enum ix86_stack_slot
{
- SLOT_VIRTUAL = 0,
- SLOT_TEMP,
+ SLOT_TEMP = 0,
SLOT_CW_STORED,
SLOT_CW_TRUNC,
SLOT_CW_FLOOR,
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 170a1a070b9..ab8f620bea6 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3968,10 +3968,7 @@
;
else
{
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- rtx temp = assign_386_stack_local (SFmode, slot);
+ rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP);
emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
DONE;
}
@@ -4152,12 +4149,7 @@
DONE;
}
else
- {
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- operands[2] = assign_386_stack_local (<MODE>mode, slot);
- }
+ operands[2] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
})
(define_insn "*truncxfsf2_mixed"
@@ -5365,12 +5357,7 @@
DONE;
}
else
- {
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- operands[2] = assign_386_stack_local (DImode, slot);
- }
+ operands[2] = assign_386_stack_local (DImode, SLOT_TEMP);
})
(define_expand "floatunsdisf2"
@@ -5401,18 +5388,9 @@
{
rtx addr = operands[1];
- if (GET_CODE (addr) == SUBREG)
+ if (SImode_address_operand (addr, VOIDmode))
{
gcc_assert (TARGET_64BIT);
- gcc_assert (<MODE>mode == SImode);
- gcc_assert (GET_MODE (SUBREG_REG (addr)) == DImode);
- return "lea{l}\t{%E1, %0|%0, %E1}";
- }
- else if (GET_CODE (addr) == ZERO_EXTEND
- || GET_CODE (addr) == AND)
- {
- gcc_assert (TARGET_64BIT);
- gcc_assert (<MODE>mode == DImode);
return "lea{l}\t{%E1, %k0|%k0, %E1}";
}
else
@@ -5425,7 +5403,11 @@
DONE;
}
[(set_attr "type" "lea")
- (set_attr "mode" "<MODE>")])
+ (set (attr "mode")
+ (if_then_else
+ (match_operand 1 "SImode_address_operand")
+ (const_string "SI")
+ (const_string "<MODE>")))])
;; Add instructions
@@ -15601,10 +15583,7 @@
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, operands[1]));
else
{
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- rtx temp = assign_386_stack_local (<MODE>mode, slot);
+ rtx temp = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
emit_move_insn (temp, operands[1]);
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, temp));
@@ -17726,7 +17705,7 @@
[(set_attr "type" "sse")
(set_attr "atom_sse_attr" "prefetch")
(set (attr "length_address")
- (symbol_ref "memory_address_length (operands[0])"))
+ (symbol_ref "memory_address_length (operands[0], false)"))
(set_attr "memory" "none")])
(define_insn "*prefetch_3dnow"
@@ -17742,7 +17721,7 @@
}
[(set_attr "type" "mmx")
(set (attr "length_address")
- (symbol_ref "memory_address_length (operands[0])"))
+ (symbol_ref "memory_address_length (operands[0], false)"))
(set_attr "memory" "none")])
(define_expand "stack_protect_set"
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index c78384b300e..9e312915bfc 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -822,6 +822,10 @@
return parts.seg == SEG_DEFAULT;
})
+;; Return true for RTX codes that force SImode address.
+(define_predicate "SImode_address_operand"
+ (match_code "subreg,zero_extend,and"))
+
;; Return true if op if a valid base register, displacement or
;; sum of base register and displacement for VSIB addressing.
(define_predicate "vsib_address_operand"
@@ -991,7 +995,7 @@
;; by the modRM array.
(define_predicate "long_memory_operand"
(and (match_operand 0 "memory_operand")
- (match_test "memory_address_length (op)")))
+ (match_test "memory_address_length (op, false)")))
;; Return true if OP is a comparison operator that can be issued by fcmov.
(define_predicate "fcmov_comparison_operator"
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 1917cb660a5..e1600decc47 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -21,7 +21,8 @@
(define_c_enum "unspec" [
;; SSE
UNSPEC_MOVNT
- UNSPEC_MOVU
+ UNSPEC_LOADU
+ UNSPEC_STOREU
;; SSE3
UNSPEC_LDDQU
@@ -580,23 +581,51 @@
DONE;
})
-(define_insn "<sse>_movu<ssemodesuffix><avxsizesuffix>"
- [(set (match_operand:VF 0 "nonimmediate_operand" "=x,m")
+(define_insn "<sse>_loadu<ssemodesuffix><avxsizesuffix>"
+ [(set (match_operand:VF 0 "register_operand" "=x")
(unspec:VF
- [(match_operand:VF 1 "nonimmediate_operand" "xm,x")]
- UNSPEC_MOVU))]
- "TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ [(match_operand:VF 1 "memory_operand" "m")]
+ UNSPEC_LOADU))]
+ "TARGET_SSE"
"%vmovu<ssemodesuffix>\t{%1, %0|%0, %1}"
[(set_attr "type" "ssemov")
(set_attr "movu" "1")
(set_attr "prefix" "maybe_vex")
(set_attr "mode" "<MODE>")])
-(define_insn "<sse2>_movdqu<avxsizesuffix>"
- [(set (match_operand:VI1 0 "nonimmediate_operand" "=x,m")
- (unspec:VI1 [(match_operand:VI1 1 "nonimmediate_operand" "xm,x")]
- UNSPEC_MOVU))]
- "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+(define_insn "<sse>_storeu<ssemodesuffix><avxsizesuffix>"
+ [(set (match_operand:VF 0 "memory_operand" "=m")
+ (unspec:VF
+ [(match_operand:VF 1 "register_operand" "x")]
+ UNSPEC_STOREU))]
+ "TARGET_SSE"
+ "%vmovu<ssemodesuffix>\t{%1, %0|%0, %1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "movu" "1")
+ (set_attr "prefix" "maybe_vex")
+ (set_attr "mode" "<MODE>")])
+
+(define_insn "<sse2>_loaddqu<avxsizesuffix>"
+ [(set (match_operand:VI1 0 "register_operand" "=x")
+ (unspec:VI1 [(match_operand:VI1 1 "memory_operand" "m")]
+ UNSPEC_LOADU))]
+ "TARGET_SSE2"
+ "%vmovdqu\t{%1, %0|%0, %1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "movu" "1")
+ (set (attr "prefix_data16")
+ (if_then_else
+ (match_test "TARGET_AVX")
+ (const_string "*")
+ (const_string "1")))
+ (set_attr "prefix" "maybe_vex")
+ (set_attr "mode" "<sseinsnmode>")])
+
+(define_insn "<sse2>_storedqu<avxsizesuffix>"
+ [(set (match_operand:VI1 0 "memory_operand" "=m")
+ (unspec:VI1 [(match_operand:VI1 1 "register_operand" "x")]
+ UNSPEC_STOREU))]
+ "TARGET_SSE2"
"%vmovdqu\t{%1, %0|%0, %1}"
[(set_attr "type" "ssemov")
(set_attr "movu" "1")
@@ -12286,7 +12315,7 @@
(set_attr "mode" "<sseinsnmode>")])
(define_insn "<avx_avx2>_maskstore<ssemodesuffix><avxsizesuffix>"
- [(set (match_operand:V48_AVX2 0 "memory_operand" "=m")
+ [(set (match_operand:V48_AVX2 0 "memory_operand" "+m")
(unspec:V48_AVX2
[(match_operand:<sseintvecmode> 1 "register_operand" "x")
(match_operand:V48_AVX2 2 "register_operand" "x")
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
index ddff1e680ea..a58a1b94895 100644
--- a/gcc/config/i386/sync.md
+++ b/gcc/config/i386/sync.md
@@ -149,9 +149,7 @@
if (<MODE>mode == DImode && !TARGET_64BIT)
emit_insn (gen_atomic_loaddi_fpu
(operands[0], operands[1],
- assign_386_stack_local (DImode,
- (virtuals_instantiated
- ? SLOT_TEMP : SLOT_VIRTUAL))));
+ assign_386_stack_local (DImode, SLOT_TEMP)));
else
emit_move_insn (operands[0], operands[1]);
DONE;
@@ -212,9 +210,7 @@
out to be significantly larger than this plus a barrier. */
emit_insn (gen_atomic_storedi_fpu
(operands[0], operands[1],
- assign_386_stack_local (DImode,
- (virtuals_instantiated
- ? SLOT_TEMP : SLOT_VIRTUAL))));
+ assign_386_stack_local (DImode, SLOT_TEMP)));
}
else
{
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 1adab928d5d..b32430a7e54 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -2943,8 +2943,10 @@ ia64_compute_frame_size (HOST_WIDE_INT size)
/* We always use the 16-byte scratch area provided by the caller, but
if we are a leaf function, there's no one to which we need to provide
- a scratch area. */
- if (current_function_is_leaf)
+ a scratch area. However, if the function allocates dynamic stack space,
+ the dynamic offset is computed early and contains STACK_POINTER_OFFSET,
+ so we need to cope. */
+ if (current_function_is_leaf && !cfun->calls_alloca)
total_size = MAX (0, total_size - 16);
current_frame_info.total_size = total_size;
@@ -2978,18 +2980,15 @@ ia64_initial_elimination_offset (int from, int to)
switch (to)
{
case HARD_FRAME_POINTER_REGNUM:
- if (current_function_is_leaf)
- offset = -current_frame_info.total_size;
- else
- offset = -(current_frame_info.total_size
- - crtl->outgoing_args_size - 16);
+ offset = -current_frame_info.total_size;
+ if (!current_function_is_leaf || cfun->calls_alloca)
+ offset += 16 + crtl->outgoing_args_size;
break;
case STACK_POINTER_REGNUM:
- if (current_function_is_leaf)
- offset = 0;
- else
- offset = 16 + crtl->outgoing_args_size;
+ offset = 0;
+ if (!current_function_is_leaf || cfun->calls_alloca)
+ offset += 16 + crtl->outgoing_args_size;
break;
default:
diff --git a/gcc/config/microblaze/rtems.h b/gcc/config/microblaze/rtems.h
new file mode 100644
index 00000000000..fecf7a295d5
--- /dev/null
+++ b/gcc/config/microblaze/rtems.h
@@ -0,0 +1,25 @@
+/* Definitions for rtems targeting a microblaze using ELF.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* Specify predefined symbols in preprocessor. */
+
+#define TARGET_OS_CPP_BUILTINS() do { \
+ builtin_define( "__rtems__" ); \
+ builtin_assert( "system=rtems" ); \
+} while (0)
diff --git a/gcc/config/microblaze/t-rtems b/gcc/config/microblaze/t-rtems
new file mode 100644
index 00000000000..d0c38261aaa
--- /dev/null
+++ b/gcc/config/microblaze/t-rtems
@@ -0,0 +1 @@
+# Custom multilibs for RTEMS
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 509e37f0440..1a87adcd6ac 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -4851,12 +4851,9 @@ pa_issue_rate (void)
-/* Return any length adjustment needed by INSN which already has its length
- computed as LENGTH. Return zero if no adjustment is necessary.
-
- For the PA: function calls, millicode calls, and backwards short
- conditional branches with unfilled delay slots need an adjustment by +1
- (to account for the NOP which will be inserted into the instruction stream).
+/* Return any length plus adjustment needed by INSN which already has
+ its length computed as LENGTH. Return LENGTH if no adjustment is
+ necessary.
Also compute the length of an inline block move here as it is too
complicated to express as a length attribute in pa.md. */
@@ -4865,19 +4862,40 @@ pa_adjust_insn_length (rtx insn, int length)
{
rtx pat = PATTERN (insn);
+ /* If length is negative or undefined, provide initial length. */
+ if ((unsigned int) length >= INT_MAX)
+ {
+ if (GET_CODE (pat) == SEQUENCE)
+ insn = XVECEXP (pat, 0, 0);
+
+ switch (get_attr_type (insn))
+ {
+ case TYPE_MILLI:
+ length = pa_attr_length_millicode_call (insn);
+ break;
+ case TYPE_CALL:
+ length = pa_attr_length_call (insn, 0);
+ break;
+ case TYPE_SIBCALL:
+ length = pa_attr_length_call (insn, 1);
+ break;
+ case TYPE_DYNCALL:
+ length = pa_attr_length_indirect_call (insn);
+ break;
+ case TYPE_SH_FUNC_ADRS:
+ length = pa_attr_length_millicode_call (insn) + 20;
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ }
+
/* Jumps inside switch tables which have unfilled delay slots need
adjustment. */
if (GET_CODE (insn) == JUMP_INSN
&& GET_CODE (pat) == PARALLEL
&& get_attr_type (insn) == TYPE_BTABLE_BRANCH)
- return 4;
- /* Millicode insn with an unfilled delay slot. */
- else if (GET_CODE (insn) == INSN
- && GET_CODE (pat) != SEQUENCE
- && GET_CODE (pat) != USE
- && GET_CODE (pat) != CLOBBER
- && get_attr_type (insn) == TYPE_MILLI)
- return 4;
+ length += 4;
/* Block move pattern. */
else if (GET_CODE (insn) == INSN
&& GET_CODE (pat) == PARALLEL
@@ -4886,7 +4904,7 @@ pa_adjust_insn_length (rtx insn, int length)
&& GET_CODE (XEXP (XVECEXP (pat, 0, 0), 1)) == MEM
&& GET_MODE (XEXP (XVECEXP (pat, 0, 0), 0)) == BLKmode
&& GET_MODE (XEXP (XVECEXP (pat, 0, 0), 1)) == BLKmode)
- return compute_movmem_length (insn) - 4;
+ length += compute_movmem_length (insn) - 4;
/* Block clear pattern. */
else if (GET_CODE (insn) == INSN
&& GET_CODE (pat) == PARALLEL
@@ -4894,7 +4912,7 @@ pa_adjust_insn_length (rtx insn, int length)
&& GET_CODE (XEXP (XVECEXP (pat, 0, 0), 0)) == MEM
&& XEXP (XVECEXP (pat, 0, 0), 1) == const0_rtx
&& GET_MODE (XEXP (XVECEXP (pat, 0, 0), 0)) == BLKmode)
- return compute_clrmem_length (insn) - 4;
+ length += compute_clrmem_length (insn) - 4;
/* Conditional branch with an unfilled delay slot. */
else if (GET_CODE (insn) == JUMP_INSN && ! simplejump_p (insn))
{
@@ -4903,11 +4921,11 @@ pa_adjust_insn_length (rtx insn, int length)
&& length == 4
&& JUMP_LABEL (insn) != NULL_RTX
&& ! forward_branch_p (insn))
- return 4;
+ length += 4;
else if (GET_CODE (pat) == PARALLEL
&& get_attr_type (insn) == TYPE_PARALLEL_BRANCH
&& length == 4)
- return 4;
+ length += 4;
/* Adjust dbra insn with short backwards conditional branch with
unfilled delay slot -- only for case where counter is in a
general register register. */
@@ -4917,11 +4935,9 @@ pa_adjust_insn_length (rtx insn, int length)
&& ! FP_REG_P (XEXP (XVECEXP (pat, 0, 1), 0))
&& length == 4
&& ! forward_branch_p (insn))
- return 4;
- else
- return 0;
+ length += 4;
}
- return 0;
+ return length;
}
/* Implement the TARGET_PRINT_OPERAND_PUNCT_VALID_P hook. */
@@ -7481,15 +7497,13 @@ pa_output_millicode_call (rtx insn, rtx call_dest)
/* Handle the common case where we are sure that the branch will
reach the beginning of the $CODE$ subspace. The within reach
- form of the $$sh_func_adrs call has a length of 28. Because
- it has an attribute type of multi, it never has a nonzero
- sequence length. The length of the $$sh_func_adrs is the same
- as certain out of reach PIC calls to other routines. */
+ form of the $$sh_func_adrs call has a length of 28. Because it
+ has an attribute type of sh_func_adrs, it never has a nonzero
+ sequence length (i.e., the delay slot is never filled). */
if (!TARGET_LONG_CALLS
- && ((seq_length == 0
- && (attr_length == 12
- || (attr_length == 28 && get_attr_type (insn) == TYPE_MULTI)))
- || (seq_length != 0 && attr_length == 8)))
+ && (attr_length == 8
+ || (attr_length == 28
+ && get_attr_type (insn) == TYPE_SH_FUNC_ADRS)))
{
output_asm_insn ("{bl|b,l} %0,%2", xoperands);
}
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index d977c64fdb2..7a1a6fa7e09 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1273,8 +1273,8 @@ do { \
/* Handling the special cases is going to get too complicated for a macro,
just call `pa_adjust_insn_length' to do the real work. */
-#define ADJUST_INSN_LENGTH(INSN, LENGTH) \
- LENGTH += pa_adjust_insn_length (INSN, LENGTH);
+#define ADJUST_INSN_LENGTH(INSN, LENGTH) \
+ ((LENGTH) = pa_adjust_insn_length ((INSN), (LENGTH)))
/* Millicode insns are actually function calls with some special
constraints on arguments and register usage.
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index 057eef0b4b7..79a15d67c27 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -81,7 +81,7 @@
;; type "binary" insns have two input operands (1,2) and one output (0)
(define_attr "type"
- "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,parallel_branch,fpstore_load,store_fpload"
+ "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,sh_func_adrs,parallel_branch,fpstore_load,store_fpload"
(const_string "binary"))
(define_attr "pa_combine_type"
@@ -124,7 +124,7 @@
;; For conditional branches. Frame related instructions are not allowed
;; because they confuse the unwind support.
(define_attr "in_branch_delay" "false,true"
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
+ (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
(eq_attr "length" "4")
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
(const_string "true")
@@ -133,7 +133,7 @@
;; Disallow instructions which use the FPU since they will tie up the FPU
;; even if the instruction is nullified.
(define_attr "in_nullified_branch_delay" "false,true"
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
+ (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
(eq_attr "length" "4")
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
(const_string "true")
@@ -142,7 +142,7 @@
;; For calls and millicode calls. Allow unconditional branches in the
;; delay slot.
(define_attr "in_call_delay" "false,true"
- (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
+ (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
(eq_attr "length" "4")
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
(const_string "true")
@@ -157,6 +157,10 @@
(define_delay (eq_attr "type" "call")
[(eq_attr "in_call_delay" "true") (nil) (nil)])
+;; Sibcall delay slot description.
+(define_delay (eq_attr "type" "sibcall")
+ [(eq_attr "in_call_delay" "true") (nil) (nil)])
+
;; Millicode call delay slot description.
(define_delay (eq_attr "type" "milli")
[(eq_attr "in_call_delay" "true") (nil) (nil)])
@@ -611,7 +615,7 @@
;; to assume have zero latency.
(define_insn_reservation "Z3" 0
(and
- (eq_attr "type" "!load,fpload,store,fpstore,uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch,fpcc,fpalu,fpmulsgl,fpmuldbl,fpsqrtsgl,fpsqrtdbl,fpdivsgl,fpdivdbl,fpstore_load,store_fpload")
+ (eq_attr "type" "!load,fpload,store,fpstore,uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,fpcc,fpalu,fpmulsgl,fpmuldbl,fpsqrtsgl,fpsqrtdbl,fpdivsgl,fpdivdbl,fpstore_load,store_fpload")
(eq_attr "cpu" "8000"))
"inm_8000,rnm_8000")
@@ -619,7 +623,7 @@
;; retirement unit.
(define_insn_reservation "Z4" 0
(and
- (eq_attr "type" "uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
+ (eq_attr "type" "uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
(eq_attr "cpu" "8000"))
"inm0_8000+inm1_8000,rnm0_8000+rnm1_8000")
@@ -5336,7 +5340,9 @@
"!TARGET_64BIT"
"* return pa_output_mul_insn (0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_insn ""
[(set (reg:SI 29) (mult:SI (reg:SI 26) (reg:SI 25)))
@@ -5347,7 +5353,9 @@
"TARGET_64BIT"
"* return pa_output_mul_insn (0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_expand "muldi3"
[(set (match_operand:DI 0 "register_operand" "")
@@ -5438,7 +5446,9 @@
"*
return pa_output_div_insn (operands, 0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_insn ""
[(set (reg:SI 29)
@@ -5452,7 +5462,9 @@
"*
return pa_output_div_insn (operands, 0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_expand "udivsi3"
[(set (reg:SI 26) (match_operand:SI 1 "move_src_operand" ""))
@@ -5495,7 +5507,9 @@
"*
return pa_output_div_insn (operands, 1, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_insn ""
[(set (reg:SI 29)
@@ -5509,7 +5523,9 @@
"*
return pa_output_div_insn (operands, 1, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_expand "modsi3"
[(set (reg:SI 26) (match_operand:SI 1 "move_src_operand" ""))
@@ -5548,7 +5564,9 @@
"*
return pa_output_mod_insn (0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_insn ""
[(set (reg:SI 29) (mod:SI (reg:SI 26) (reg:SI 25)))
@@ -5561,7 +5579,9 @@
"*
return pa_output_mod_insn (0, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_expand "umodsi3"
[(set (reg:SI 26) (match_operand:SI 1 "move_src_operand" ""))
@@ -5600,7 +5620,9 @@
"*
return pa_output_mod_insn (1, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
(define_insn ""
[(set (reg:SI 29) (umod:SI (reg:SI 26) (reg:SI 25)))
@@ -5613,7 +5635,9 @@
"*
return pa_output_mod_insn (1, insn);"
[(set_attr "type" "milli")
- (set (attr "length") (symbol_ref "pa_attr_length_millicode_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_millicode_call (insn)")))])
;;- and instructions
;; We define DImode `and` so with DImode `not` we can get
@@ -7189,7 +7213,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[0], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
(define_insn "call_symref_pic"
[(set (match_operand:SI 2 "register_operand" "=&r") (reg:SI 19))
@@ -7266,7 +7292,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[0], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -7351,7 +7379,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[0], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
(define_insn "call_reg"
[(call (mem:SI (reg:SI 22))
@@ -7365,7 +7395,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, gen_rtx_REG (word_mode, 22));
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -7443,7 +7475,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, gen_rtx_REG (word_mode, 22));
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -7527,7 +7561,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, operands[0]);
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 12)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
(define_expand "call_value"
[(parallel [(set (match_operand 0 "" "")
@@ -7653,7 +7689,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[1], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
(define_insn "call_val_symref_pic"
[(set (match_operand:SI 3 "register_operand" "=&r") (reg:SI 19))
@@ -7736,7 +7774,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[1], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -7827,7 +7867,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_call (insn, operands[1], 0);
}"
[(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 0)")))])
(define_insn "call_val_reg"
[(set (match_operand 0 "" "")
@@ -7842,7 +7884,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, gen_rtx_REG (word_mode, 22));
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -7926,7 +7970,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, gen_rtx_REG (word_mode, 22));
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
;; This pattern is split if it is necessary to save and restore the
;; PIC register.
@@ -8016,7 +8062,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
return pa_output_indirect_call (insn, operands[1]);
}"
[(set_attr "type" "dyncall")
- (set (attr "length") (symbol_ref "pa_attr_length_indirect_call (insn)"))])
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 12)]
+ (symbol_ref "pa_attr_length_indirect_call (insn)")))])
;; Call subroutine returning any type.
@@ -8109,8 +8157,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
pa_output_arg_descriptor (insn);
return pa_output_call (insn, operands[0], 1);
}"
- [(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 1)"))])
+ [(set_attr "type" "sibcall")
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 1)")))])
(define_insn "sibcall_internal_symref_64bit"
[(call (mem:SI (match_operand 0 "call_operand_address" ""))
@@ -8124,8 +8174,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
pa_output_arg_descriptor (insn);
return pa_output_call (insn, operands[0], 1);
}"
- [(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 1)"))])
+ [(set_attr "type" "sibcall")
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 1)")))])
(define_expand "sibcall_value"
[(set (match_operand 0 "" "")
@@ -8193,8 +8245,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
pa_output_arg_descriptor (insn);
return pa_output_call (insn, operands[1], 1);
}"
- [(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 1)"))])
+ [(set_attr "type" "sibcall")
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 1)")))])
(define_insn "sibcall_value_internal_symref_64bit"
[(set (match_operand 0 "" "")
@@ -8209,8 +8263,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
pa_output_arg_descriptor (insn);
return pa_output_call (insn, operands[1], 1);
}"
- [(set_attr "type" "call")
- (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 1)"))])
+ [(set_attr "type" "sibcall")
+ (set (attr "length")
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 8)]
+ (symbol_ref "pa_attr_length_call (insn, 1)")))])
(define_insn "nop"
[(const_int 0)]
@@ -9246,10 +9302,11 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
gen_rtx_SYMBOL_REF (SImode,
\"$$sh_func_adrs\"));
}"
- [(set_attr "type" "multi")
+ [(set_attr "type" "sh_func_adrs")
(set (attr "length")
- (plus (symbol_ref "pa_attr_length_millicode_call (insn)")
- (const_int 20)))])
+ (cond [(and (const_int 0) (eq (const_int 0) (pc))) (const_int 28)]
+ (plus (symbol_ref "pa_attr_length_millicode_call (insn)")
+ (const_int 20))))])
;; On the PA, the PIC register is call clobbered, so it must
;; be saved & restored around calls by the caller. If the call
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 29dd18d75bd..72377f9dc42 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -891,12 +891,16 @@
{
if (MEM_P (op))
{
+ if (! volatile_ok && MEM_VOLATILE_P (op))
+ return 0;
if (mode == DFmode)
mode = V2DFmode;
else if (mode == DImode)
mode = V2DImode;
else
- gcc_unreachable ();
+ gcc_unreachable ();
+ return memory_address_addr_space_p (mode, XEXP (op, 0),
+ MEM_ADDR_SPACE (op));
}
return input_operand (op, mode);
})
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index f0780c61ab5..181c9cd0fe2 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9662,47 +9662,39 @@
;; the constant into an FP register, since it will probably be used there.
;; The "??" is a kludge until we can figure out a more reasonable way
;; of handling these non-offsettable values.
+
+;; The move constraints are ordered to prefer floating point registers before
+;; general purpose registers to avoid doing a store and a load to get the value
+;; into a floating point register when it is needed for a floating point
+;; operation. Prefer traditional floating point registers over VSX registers,
+;; since the D-form version of the memory instructions does not need a GPR for
+;; reloading.
+
(define_insn "*movdf_hardfloat32"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,ws,?wa,ws,?wa,Z,?Z,d,d,m,wa,!r,!r,!r")
- (match_operand:DF 1 "input_operand" "r,m,r,ws,wa,Z,Z,ws,wa,d,m,d,j,G,H,F"))]
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=m,d,d,ws,?wa,Z,?Z,ws,?wa,wa,Y,??r,!r,!r,!r,!r")
+ (match_operand:DF 1 "input_operand" "d,m,d,Z,Z,ws,wa,ws,wa,j,r,Y,r,G,H,F"))]
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
- "*
-{
- switch (which_alternative)
- {
- default:
- gcc_unreachable ();
- case 0:
- case 1:
- case 2:
- return \"#\";
- case 3:
- case 4:
- return \"xxlor %x0,%x1,%x1\";
- case 5:
- case 6:
- return \"lxsd%U1x %x0,%y1\";
- case 7:
- case 8:
- return \"stxsd%U0x %x1,%y0\";
- case 9:
- return \"fmr %0,%1\";
- case 10:
- return \"lfd%U1%X1 %0,%1\";
- case 11:
- return \"stfd%U0%X0 %1,%0\";
- case 12:
- return \"xxlxor %x0,%x0,%x0\";
- case 13:
- case 14:
- case 15:
- return \"#\";
- }
-}"
- [(set_attr "type" "two,load,store,fp,fp,fpload,fpload,fpstore,fpstore,fp,fpload,fpstore,vecsimple,*,*,*")
- (set_attr "length" "8,16,16,4,4,4,4,4,4,4,4,4,4,8,12,16")])
+ "@
+ stfd%U0%X0 %1,%0
+ lfd%U1%X1 %0,%1
+ fmr %0,%1
+ lxsd%U1x %x0,%y1
+ lxsd%U1x %x0,%y1
+ stxsd%U0x %x1,%y0
+ stxsd%U0x %x1,%y0
+ xxlor %x0,%x1,%x1
+ xxlor %x0,%x1,%x1
+ xxlxor %x0,%x0,%x0
+ #
+ #
+ #
+ #
+ #
+ #"
+ [(set_attr "type" "fpstore,fpload,fp,fpload,fpload,fpstore,fpstore,vecsimple,vecsimple,vecsimple,store,load,two,fp,fp,*")
+ (set_attr "length" "4,4,4,4,4,4,4,4,4,4,8,8,8,8,12,16")])
(define_insn "*movdf_softfloat32"
[(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r")
@@ -9774,33 +9766,33 @@
; ld/std require word-aligned displacements -> 'Y' constraint.
; List Y->r and r->Y before r->r for reload.
(define_insn "*movdf_hardfloat64"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,ws,?wa,ws,?wa,Z,?Z,d,d,m,wa,*c*l,!r,*h,!r,!r,!r")
- (match_operand:DF 1 "input_operand" "r,Y,r,ws,wa,Z,Z,ws,wa,d,m,d,j,r,h,0,G,H,F"))]
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=m,d,d,Y,??r,!r,ws,?wa,Z,?Z,ws,?wa,wa,*c*l,!r,*h,!r,!r,!r")
+ (match_operand:DF 1 "input_operand" "d,m,d,r,Y,r,Z,Z,ws,wa,ws,wa,j,r,h,0,G,H,F"))]
"TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
&& TARGET_DOUBLE_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"@
+ stfd%U0%X0 %1,%0
+ lfd%U1%X1 %0,%1
+ fmr %0,%1
std%U0%X0 %1,%0
ld%U1%X1 %0,%1
mr %0,%1
- xxlor %x0,%x1,%x1
- xxlor %x0,%x1,%x1
lxsd%U1x %x0,%y1
lxsd%U1x %x0,%y1
stxsd%U0x %x1,%y0
stxsd%U0x %x1,%y0
- fmr %0,%1
- lfd%U1%X1 %0,%1
- stfd%U0%X0 %1,%0
+ xxlor %x0,%x1,%x1
+ xxlor %x0,%x1,%x1
xxlxor %x0,%x0,%x0
mt%0 %1
mf%1 %0
- {cror 0,0,0|nop}
+ nop
#
#
#"
- [(set_attr "type" "store,load,*,fp,fp,fpload,fpload,fpstore,fpstore,fp,fpload,fpstore,vecsimple,mtjmpr,mfjmpr,*,*,*,*")
+ [(set_attr "type" "fpstore,fpload,fp,store,load,*,fpload,fpload,fpstore,fpstore,vecsimple,vecsimple,vecsimple,mtjmpr,mfjmpr,*,*,*,*")
(set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,12,16")])
(define_insn "*movdf_softfloat64"
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index ba2ec35e20a..90dfd89a134 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -136,9 +136,9 @@ along with GCC; see the file COPYING3. If not see
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
-#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
+#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plus" AS_NIAGARA3_FLAG
#undef ASM_CPU64_DEFAULT_SPEC
-#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
+#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG AS_NIAGARA3_FLAG
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
#endif
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index a1919b4e7e7..93c09388243 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1742,10 +1742,10 @@ extern int sparc_indent_opcode;
#define TARGET_SUN_TLS TARGET_TLS
#define TARGET_GNU_TLS 0
-#ifndef HAVE_AS_FMAF_HPC_VIS3
-#define AS_NIAGARA3_FLAG "b"
-#else
+#ifdef HAVE_AS_FMAF_HPC_VIS3
#define AS_NIAGARA3_FLAG "d"
+#else
+#define AS_NIAGARA3_FLAG "b"
#endif
/* The number of Pmode words for the setjmp buffer. */
diff --git a/gcc/config/sparc/t-rtems b/gcc/config/sparc/t-rtems
new file mode 100644
index 00000000000..4a01e1eaaf3
--- /dev/null
+++ b/gcc/config/sparc/t-rtems
@@ -0,0 +1,22 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC 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.
+#
+# GCC 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 GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+MULTILIB_OPTIONS = msoft-float mcpu=v8
+MULTILIB_DIRNAMES = soft v8
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff --git a/gcc/config/sparc/t-rtems-64 b/gcc/config/sparc/t-rtems-64
new file mode 100644
index 00000000000..d6a6e3eea37
--- /dev/null
+++ b/gcc/config/sparc/t-rtems-64
@@ -0,0 +1,22 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC 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.
+#
+# GCC 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 GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = soft
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff --git a/gcc/configure b/gcc/configure
index 689139dae60..8da6e9dcb8f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -26613,7 +26613,9 @@ if test "${gcc_cv_ld_no_dot_syms+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_ld_no_dot_syms=no
- if test $in_tree_ld = yes ; then
+ if test x"$ld_is_gold" = xyes; then
+ gcc_cv_ld_no_dot_syms=yes
+ elif test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then
gcc_cv_ld_no_dot_syms=yes
fi
@@ -26657,7 +26659,9 @@ if test "${gcc_cv_ld_large_toc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_ld_large_toc=no
- if test $in_tree_ld = yes ; then
+ if test x"$ld_is_gold" = xyes; then
+ gcc_cv_ld_large_toc=yes
+ elif test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then
gcc_cv_ld_large_toc=yes
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9fc9acc6cc1..7d3157e9f1c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4501,7 +4501,9 @@ case "$target:$tm_file" in
AC_CACHE_CHECK(linker support for omitting dot symbols,
gcc_cv_ld_no_dot_syms,
[gcc_cv_ld_no_dot_syms=no
- if test $in_tree_ld = yes ; then
+ if test x"$ld_is_gold" = xyes; then
+ gcc_cv_ld_no_dot_syms=yes
+ elif test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then
gcc_cv_ld_no_dot_syms=yes
fi
@@ -4538,7 +4540,9 @@ EOF
AC_CACHE_CHECK(linker large toc support,
gcc_cv_ld_large_toc,
[gcc_cv_ld_large_toc=no
- if test $in_tree_ld = yes ; then
+ if test x"$ld_is_gold" = xyes; then
+ gcc_cv_ld_large_toc=yes
+ elif test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then
gcc_cv_ld_large_toc=yes
fi
diff --git a/gcc/coverage.c b/gcc/coverage.c
index f8b021a9d81..ca66133a279 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -2151,7 +2151,8 @@ build_info (tree info_type, tree fn_ary)
/* mod_info */
mod_value = build_gcov_module_info_value (TREE_TYPE (TREE_TYPE (info_fields)));
- mod_value = build1 (ADDR_EXPR, TREE_TYPE (mod_value), mod_value);
+ mod_value = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (mod_value)),
+ mod_value);
CONSTRUCTOR_APPEND_ELT (v1, info_fields, mod_value);
info_fields = DECL_CHAIN (info_fields);
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index afe99a280a8..3c7b3fdfbab 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,98 @@
+2012-12-07 Matthias Klose <doko@ubuntu.com>
+
+ * tree.c (build_aggr_init_expr): Add parameter name, mark as unused.
+
+2012-12-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/54325
+ * tree.c (build_aggr_init_expr): Don't check for abstract class.
+ (build_cplus_new): Check here instead.
+
+ PR c++/55058
+ * pt.c (tsubst): Keep the quals when looking through a typedef.
+
+ PR c++/55249
+ * tree.c (build_vec_init_elt): Use the type of the initializer.
+
+ PR c++/54744
+ * pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
+
+ PR c++/54947
+ * parser.c (cp_parser_initializer_list): Don't require an
+ expression in [] to be constant until we know it's a C99
+ designator.
+
+ PR c++/55015
+ PR c++/53821
+ * semantics.c (maybe_add_lambda_conv_op): Revert earlier change.
+ * decl.c (start_preparsed_function): Make local class methods comdat
+ in templates, too.
+
+2012-11-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/53137
+ * pt.c (tsubst_expr) [DECL_EXPR]: Set LAMBDA_EXPR_THIS_CAPTURE here.
+ (tsubst_copy_and_build) [LAMBDA_EXPR]: And clear it here.
+ (instantiate_class_template_1): Not here.
+
+ PR c++/53862
+ * pt.c (tsubst_arg_types): Add "end" parameter.
+ (check_undeduced_parms): Use it.
+
+ PR c++/53039
+ * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
+ cp_tree_equal.
+
+ * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
+ (struct template_parm_index_s): Remove num_siblings.
+ * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
+ (fixup_template_type_parm_type): Remove.
+ (build_template_parm_index): Remove num_siblings parm.
+ (process_template_parm): Likewise.
+ * parser.c (cp_parser_template_parameter_list): Adjust.
+ * tree.c (cp_tree_equal): Don't compare num_siblings.
+ * typeck.c (comp_template_parms_position): Likewise.
+
+ PR c++/50852
+ PR c++/53039
+ * tree.c (strip_typedefs_expr): New.
+ * cp-tree.h: Declare it.
+ * pt.c (convert_template_argument, unify): Use it.
+ * parser.c (cp_parser_template_declaration_after_export): Don't call
+ fixup_template_parms.
+
+2012-11-29 Kai Tietz <ktietz@redhat.com>
+
+ PR target/53912
+ * class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t.
+ (dump_vtable): Likewise.
+
+2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55446
+ * init.c (build_vec_init): Do not early return error_mark_mode
+ when integer_all_onesp (maxindex).
+
+2012-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54988
+ * decl2.c (cplus_decl_attributes): Don't return early
+ if attributes is NULL.
+
+2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54984
+ * init.c (build_new): Don't turn a null *init into a pointer to
+ empty vector orig_init.
+
+2012-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54858
+ * tree.c (cp_tree_equal): Handle FIELD_DECL.
+
2012-10-03 Jakub Jelinek <jakub@redhat.com>
PR c++/54777
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 532deff219b..3f9e2e02639 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7536,9 +7536,9 @@ dump_class_hierarchy_r (FILE *stream,
int i;
indented = maybe_indent_hierarchy (stream, indent, 0);
- fprintf (stream, "%s (0x%lx) ",
+ fprintf (stream, "%s (0x" HOST_WIDE_INT_PRINT_HEX ") ",
type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER),
- (unsigned long) binfo);
+ (HOST_WIDE_INT) (uintptr_t) binfo);
if (binfo != igo)
{
fprintf (stream, "alternative-path\n");
@@ -7560,10 +7560,10 @@ dump_class_hierarchy_r (FILE *stream,
if (BINFO_PRIMARY_P (binfo))
{
indented = maybe_indent_hierarchy (stream, indent + 3, indented);
- fprintf (stream, " primary-for %s (0x%lx)",
+ fprintf (stream, " primary-for %s (0x" HOST_WIDE_INT_PRINT_HEX ")",
type_as_string (BINFO_TYPE (BINFO_INHERITANCE_CHAIN (binfo)),
TFF_PLAIN_IDENTIFIER),
- (unsigned long)BINFO_INHERITANCE_CHAIN (binfo));
+ (HOST_WIDE_INT) (uintptr_t) BINFO_INHERITANCE_CHAIN (binfo));
}
if (BINFO_LOST_PRIMARY_P (binfo))
{
@@ -7696,7 +7696,8 @@ dump_vtable (tree t, tree binfo, tree vtable)
if (ctor_vtbl_p)
{
if (!BINFO_VIRTUAL_P (binfo))
- fprintf (stream, " (0x%lx instance)", (unsigned long)binfo);
+ fprintf (stream, " (0x" HOST_WIDE_INT_PRINT_HEX " instance)",
+ (HOST_WIDE_INT) (uintptr_t) binfo);
fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER));
}
fprintf (stream, "\n");
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index c64fbb5a37c..5d5a5c86532 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -249,7 +249,6 @@ struct GTY(()) template_parm_index_s {
int index;
int level;
int orig_level;
- int num_siblings;
tree decl;
};
typedef struct template_parm_index_s template_parm_index;
@@ -647,8 +646,9 @@ enum cp_lambda_default_capture_mode_type {
#define LAMBDA_EXPR_CAPTURE_LIST(NODE) \
(((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->capture_list)
-/* During parsing of the lambda, the node in the capture-list that holds
- the 'this' capture. */
+/* During parsing of the lambda-introducer, the node in the capture-list
+ that holds the 'this' capture. During parsing of the body, the
+ capture proxy for that node. */
#define LAMBDA_EXPR_THIS_CAPTURE(NODE) \
(((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->this_capture)
@@ -4516,9 +4516,6 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
((template_parm_index*)TEMPLATE_PARM_INDEX_CHECK (NODE))
#define TEMPLATE_PARM_IDX(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->index)
#define TEMPLATE_PARM_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->level)
-/* The Number of sibling parms this template parm has. */
-#define TEMPLATE_PARM_NUM_SIBLINGS(NODE) \
- (TEMPLATE_PARM_INDEX_CAST (NODE)->num_siblings)
#define TEMPLATE_PARM_DESCENDANTS(NODE) (TREE_CHAIN (NODE))
#define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level)
#define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl)
@@ -5301,9 +5298,8 @@ extern void append_type_to_template_for_access_check (tree, tree, tree,
extern tree splice_late_return_type (tree, tree);
extern bool is_auto (const_tree);
extern tree process_template_parm (tree, location_t, tree,
- bool, bool, unsigned);
+ bool, bool);
extern tree end_template_parm_list (tree);
-void fixup_template_parms (void);
extern void end_template_decl (void);
extern tree maybe_update_decl_type (tree, tree);
extern bool check_default_tmpl_args (tree, tree, int, int, int);
@@ -5676,6 +5672,7 @@ extern bool type_has_nontrivial_copy_init (const_tree);
extern bool class_tmpl_impl_spec_p (const_tree);
extern int zero_init_p (const_tree);
extern tree strip_typedefs (tree);
+extern tree strip_typedefs_expr (tree);
extern tree copy_binfo (tree, tree, tree,
tree *, int);
extern int member_p (const_tree);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 048a185bd0f..cd777a0b48e 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12971,10 +12971,9 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
if (DECL_NOT_REALLY_EXTERN (decl1))
DECL_EXTERNAL (decl1) = 0;
- if (ctx != NULL_TREE && DECL_DECLARED_INLINE_P (ctx)
- && TREE_PUBLIC (ctx))
+ if (ctx != NULL_TREE && vague_linkage_p (ctx))
/* This is a function in a local class in an extern inline
- function. */
+ or template function. */
comdat_linkage (decl1);
}
/* If this function belongs to an interface, it is public.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index acc36b2b672..de29af4f837 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1313,8 +1313,7 @@ void
cplus_decl_attributes (tree *decl, tree attributes, int flags)
{
if (*decl == NULL_TREE || *decl == void_type_node
- || *decl == error_mark_node
- || attributes == NULL_TREE)
+ || *decl == error_mark_node)
return;
if (processing_template_decl)
@@ -1323,8 +1322,6 @@ cplus_decl_attributes (tree *decl, tree attributes, int flags)
return;
save_template_attributes (&attributes, decl);
- if (attributes == NULL_TREE)
- return;
}
cp_check_const_attributes (attributes);
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index acf69536da3..4e6d3fb5554 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -2799,7 +2799,8 @@ build_new (VEC(tree,gc) **placement, tree type, tree nelts,
orig_placement = make_tree_vector_copy (*placement);
orig_nelts = nelts;
- orig_init = make_tree_vector_copy (*init);
+ if (*init)
+ orig_init = make_tree_vector_copy (*init);
make_args_non_dependent (*placement);
if (nelts)
@@ -3155,8 +3156,7 @@ build_vec_init (tree base, tree maxindex, tree init,
if (TREE_CODE (atype) == ARRAY_TYPE && TYPE_DOMAIN (atype))
maxindex = array_type_nelts (atype);
- if (maxindex == NULL_TREE || maxindex == error_mark_node
- || integer_all_onesp (maxindex))
+ if (maxindex == NULL_TREE || maxindex == error_mark_node)
return error_mark_node;
if (explicit_value_init_p)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 50f534e89d3..19f3ded8c14 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -12056,8 +12056,7 @@ cp_parser_template_parameter_list (cp_parser* parser)
parm_loc,
parameter,
is_non_type,
- is_parameter_pack,
- 0);
+ is_parameter_pack);
else
{
tree err_parm = build_tree_list (parameter, parameter);
@@ -17776,11 +17775,14 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p)
/* In C++11, [ could start a lambda-introducer. */
cp_parser_parse_tentatively (parser);
cp_lexer_consume_token (parser->lexer);
- designator = cp_parser_constant_expression (parser, false, NULL);
+ bool non_const = false;
+ designator = cp_parser_constant_expression (parser, true, &non_const);
cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE);
cp_parser_require (parser, CPP_EQ, RT_EQ);
if (!cp_parser_parse_definitely (parser))
designator = NULL_TREE;
+ else if (non_const)
+ require_potential_rvalue_constant_expression (designator);
}
else
designator = NULL_TREE;
@@ -21442,7 +21444,6 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
{
/* Parse the template parameters. */
parameter_list = cp_parser_template_parameter_list (parser);
- fixup_template_parms ();
}
/* Get the deferred access checks from the parameter list. These
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5afbbf1e006..221a7c19484 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -182,7 +182,7 @@ static tree convert_template_argument (tree, tree, tree,
static int for_each_template_parm (tree, tree_fn_t, void*,
struct pointer_set_t*, bool);
static tree expand_template_argument_pack (tree);
-static tree build_template_parm_index (int, int, int, int, tree, tree);
+static tree build_template_parm_index (int, int, int, tree, tree);
static bool inline_needs_template_parms (tree);
static void push_inline_template_parms_recursive (tree, int);
static tree retrieve_local_specialization (tree);
@@ -206,7 +206,7 @@ static tree tsubst_template_parms (tree, tree, tsubst_flags_t);
static void regenerate_decl_from_template (tree, tree);
static tree most_specialized_class (tree, tree, tsubst_flags_t);
static tree tsubst_aggr_type (tree, tree, tsubst_flags_t, tree, int);
-static tree tsubst_arg_types (tree, tree, tsubst_flags_t, tree);
+static tree tsubst_arg_types (tree, tree, tree, tsubst_flags_t, tree);
static tree tsubst_function_type (tree, tree, tsubst_flags_t, tree);
static bool check_specialization_scope (void);
static tree process_partial_specialization (tree);
@@ -239,8 +239,6 @@ static tree listify_autos (tree, tree);
static tree template_parm_to_arg (tree t);
static bool arg_from_parm_pack_p (tree, tree);
static tree current_template_args (void);
-static tree fixup_template_type_parm_type (tree, int);
-static tree fixup_template_parm_index (tree, tree, int);
static tree tsubst_template_parm (tree, tree, tsubst_flags_t);
/* Make the current scope suitable for access checking when we are
@@ -3474,14 +3472,12 @@ check_template_shadow (tree decl)
}
/* Return a new TEMPLATE_PARM_INDEX with the indicated INDEX, LEVEL,
- ORIG_LEVEL, DECL, and TYPE. NUM_SIBLINGS is the total number of
- template parameters. */
+ ORIG_LEVEL, DECL, and TYPE. */
static tree
build_template_parm_index (int index,
int level,
int orig_level,
- int num_siblings,
tree decl,
tree type)
{
@@ -3489,7 +3485,6 @@ build_template_parm_index (int index,
TEMPLATE_PARM_IDX (t) = index;
TEMPLATE_PARM_LEVEL (t) = level;
TEMPLATE_PARM_ORIG_LEVEL (t) = orig_level;
- TEMPLATE_PARM_NUM_SIBLINGS (t) = num_siblings;
TEMPLATE_PARM_DECL (t) = decl;
TREE_TYPE (t) = type;
TREE_CONSTANT (t) = TREE_CONSTANT (decl);
@@ -3555,7 +3550,6 @@ reduce_template_parm_level (tree index, tree type, int levels, tree args,
t = build_template_parm_index (TEMPLATE_PARM_IDX (index),
TEMPLATE_PARM_LEVEL (index) - levels,
TEMPLATE_PARM_ORIG_LEVEL (index),
- TEMPLATE_PARM_NUM_SIBLINGS (index),
decl, type);
TEMPLATE_PARM_DESCENDANTS (index) = t;
TEMPLATE_PARM_PARAMETER_PACK (t)
@@ -3583,8 +3577,7 @@ reduce_template_parm_level (tree index, tree type, int levels, tree args,
tree
process_template_parm (tree list, location_t parm_loc, tree parm,
- bool is_non_type, bool is_parameter_pack,
- unsigned num_template_parms)
+ bool is_non_type, bool is_parameter_pack)
{
tree decl = 0;
tree defval;
@@ -3659,7 +3652,6 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
DECL_INITIAL (parm) = DECL_INITIAL (decl)
= build_template_parm_index (idx, processing_template_decl,
processing_template_decl,
- num_template_parms,
decl, TREE_TYPE (parm));
TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm))
@@ -3693,7 +3685,6 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
TEMPLATE_TYPE_PARM_INDEX (t)
= build_template_parm_index (idx, processing_template_decl,
processing_template_decl,
- num_template_parms,
decl, TREE_TYPE (parm));
TEMPLATE_TYPE_PARAMETER_PACK (t) = is_parameter_pack;
TYPE_CANONICAL (t) = canonical_type_parameter (t);
@@ -3733,305 +3724,6 @@ end_template_parm_list (tree parms)
return saved_parmlist;
}
-/* Create a new type almost identical to TYPE but which has the
- following differences:
-
- 1/ T has a new TEMPLATE_PARM_INDEX that carries the new number of
- template sibling parameters of T.
-
- 2/ T has a new canonical type that matches the new number
- of sibling parms.
-
- 3/ From now on, T is going to be what lookups referring to the
- name of TYPE will return. No lookup should return TYPE anymore.
-
- NUM_PARMS is the new number of sibling parms TYPE belongs to.
-
- This is a subroutine of fixup_template_parms. */
-
-static tree
-fixup_template_type_parm_type (tree type, int num_parms)
-{
- tree orig_idx = TEMPLATE_TYPE_PARM_INDEX (type), idx;
- tree t;
- /* This is the decl which name is inserted into the symbol table for
- the template parm type. So whenever we lookup the type name, this
- is the DECL we get. */
- tree decl;
-
- /* Do not fix up the type twice. */
- if (orig_idx && TEMPLATE_PARM_NUM_SIBLINGS (orig_idx) != 0)
- return type;
-
- t = copy_type (type);
- decl = TYPE_NAME (t);
-
- TYPE_MAIN_VARIANT (t) = t;
- TYPE_NEXT_VARIANT (t)= NULL_TREE;
- TYPE_POINTER_TO (t) = 0;
- TYPE_REFERENCE_TO (t) = 0;
-
- idx = build_template_parm_index (TEMPLATE_PARM_IDX (orig_idx),
- TEMPLATE_PARM_LEVEL (orig_idx),
- TEMPLATE_PARM_ORIG_LEVEL (orig_idx),
- num_parms,
- decl, t);
- TEMPLATE_PARM_DESCENDANTS (idx) = TEMPLATE_PARM_DESCENDANTS (orig_idx);
- TEMPLATE_PARM_PARAMETER_PACK (idx) = TEMPLATE_PARM_PARAMETER_PACK (orig_idx);
- TEMPLATE_TYPE_PARM_INDEX (t) = idx;
-
- TYPE_STUB_DECL (t) = decl;
- TEMPLATE_TYPE_DECL (t) = decl;
- if (TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM)
- TREE_TYPE (DECL_TEMPLATE_RESULT (decl)) = t;
-
- /* Update the type associated to the type name stored in the symbol
- table. Now, whenever the type name is looked up, the resulting
- type is properly fixed up. */
- TREE_TYPE (decl) = t;
-
- TYPE_CANONICAL (t) = canonical_type_parameter (t);
-
- return t;
-}
-
-/* Create and return a new TEMPLATE_PARM_INDEX that is almost
- identical to I, but that is fixed up as to:
-
- 1/ carry the number of sibling parms (NUM_PARMS) of the template
- parm represented by I.
-
- 2/ replace all references to template parm types declared before I
- (in the same template parm list as I) by references to template
- parm types contained in ARGS. ARGS should contain the list of
- template parms that have been fixed up so far, in a form suitable
- to be passed to tsubst.
-
- This is a subroutine of fixup_template_parms. */
-
-static tree
-fixup_template_parm_index (tree i, tree args, int num_parms)
-{
- tree index, decl, type;
-
- if (i == NULL_TREE
- || TREE_CODE (i) != TEMPLATE_PARM_INDEX
- /* Do not fix up the index twice. */
- || (TEMPLATE_PARM_NUM_SIBLINGS (i) != 0))
- return i;
-
- decl = TEMPLATE_PARM_DECL (i);
- type = TREE_TYPE (decl);
-
- index = build_template_parm_index (TEMPLATE_PARM_IDX (i),
- TEMPLATE_PARM_LEVEL (i),
- TEMPLATE_PARM_ORIG_LEVEL (i),
- num_parms,
- decl, type);
-
- TEMPLATE_PARM_DESCENDANTS (index) = TEMPLATE_PARM_DESCENDANTS (i);
- TEMPLATE_PARM_PARAMETER_PACK (index) = TEMPLATE_PARM_PARAMETER_PACK (i);
-
- type = tsubst (type, args, tf_none, NULL_TREE);
-
- TREE_TYPE (decl) = type;
- TREE_TYPE (index) = type;
-
- return index;
-}
-
-/*
- This is a subroutine of fixup_template_parms.
-
- It computes the canonical type of the type of the template
- parameter PARM_DESC and update all references to that type so that
- they use the newly computed canonical type. No access check is
- performed during the fixup. PARM_DESC is a TREE_LIST which
- TREE_VALUE is the template parameter and its TREE_PURPOSE is the
- default argument of the template parm if any. IDX is the index of
- the template parameter, starting at 0. NUM_PARMS is the number of
- template parameters in the set PARM_DESC belongs to. ARGLIST is a
- TREE_VEC containing the full set of template parameters in a form
- suitable to be passed to substs functions as their ARGS
- argument. This is what current_template_args returns for a given
- template. The innermost vector of args in ARGLIST is the set of
- template parms that have been fixed up so far. This function adds
- the fixed up parameter into that vector. */
-
-static void
-fixup_template_parm (tree parm_desc,
- int idx,
- int num_parms,
- tree arglist)
-{
- tree parm = TREE_VALUE (parm_desc);
- tree fixedup_args = INNERMOST_TEMPLATE_ARGS (arglist);
-
- push_deferring_access_checks (dk_no_check);
-
- if (TREE_CODE (parm) == TYPE_DECL)
- {
- /* PARM is a template type parameter. Fix up its type, add
- the fixed-up template parm to the vector of fixed-up
- template parms so far, and substitute the fixed-up
- template parms into the default argument of this
- parameter. */
- tree t =
- fixup_template_type_parm_type (TREE_TYPE (parm), num_parms);
- TREE_TYPE (parm) = t;
-
- TREE_VEC_ELT (fixedup_args, idx) = template_parm_to_arg (parm_desc);
- }
- else if (TREE_CODE (parm) == TEMPLATE_DECL)
- {
- /* PARM is a template template parameter. This is going to
- be interesting. */
- tree tparms, targs, innermost_args, t;
- int j;
-
- /* First, fix up the parms of the template template parm
- because the parms are involved in defining the new canonical
- type of the template template parm. */
-
- /* So we need to substitute the template parm types that have
- been fixed up so far into the template parms of this template
- template parm. E.g, consider this:
-
- template<class T, template<T u> class TT> class S;
-
- In this case we want to substitute T into the
- template parameters of TT.
-
- So let's walk the template parms of PARM here, and
- tsubst ARGLIST into into each of the template
- parms. */
-
- /* For this substitution we need to build the full set of
- template parameters and use that as arguments for the
- tsubsting function. */
- tparms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (parm));
-
- /* This will contain the innermost parms of PARM into which
- we have substituted so far. */
- innermost_args = make_tree_vec (TREE_VEC_LENGTH (tparms));
- targs = add_to_template_args (arglist, innermost_args);
- for (j = 0; j < TREE_VEC_LENGTH (tparms); ++j)
- {
- tree parameter;
-
- parameter = TREE_VEC_ELT (tparms, j);
-
- /* INNERMOST_ARGS needs to have at least the same number
- of elements as the index PARAMETER, ortherwise
- tsubsting into PARAMETER will result in partially
- instantiating it, reducing its tempate parm
- level. Let's tactically fill INNERMOST_ARGS for that
- purpose. */
- TREE_VEC_ELT (innermost_args, j) =
- template_parm_to_arg (parameter);
-
- fixup_template_parm (parameter, j,
- TREE_VEC_LENGTH (tparms),
- targs);
- }
-
- /* Now fix up the type of the template template parm. */
-
- t = fixup_template_type_parm_type (TREE_TYPE (parm), num_parms);
- TREE_TYPE (parm) = t;
-
- TREE_VEC_ELT (fixedup_args, idx) =
- template_parm_to_arg (parm_desc);
- }
- else if (TREE_CODE (parm) == PARM_DECL)
- {
- /* PARM is a non-type template parameter. We need to:
-
- * Fix up its TEMPLATE_PARM_INDEX to make it carry the
- proper number of sibling parameters.
-
- * Make lookups of the template parameter return a reference
- to the fixed-up index. No lookup should return references
- to the former index anymore.
-
- * Substitute the template parms that got fixed up so far
-
- * into the type of PARM. */
-
- tree index = DECL_INITIAL (parm);
-
- /* PUSHED_DECL is the decl added to the symbol table with
- the name of the parameter. E,g:
-
- template<class T, T u> //#0
- auto my_function(T t) -> decltype(u); //#1
-
- Here, when looking up u at //#1, we get the decl of u
- resulting from the declaration in #0. This is what
- PUSHED_DECL is. We need to replace the reference to the
- old TEMPLATE_PARM_INDEX carried by PUSHED_DECL by the
- fixed-up TEMPLATE_PARM_INDEX. */
- tree pushed_decl = TEMPLATE_PARM_DECL (index);
-
- /* Let's fix up the TEMPLATE_PARM_INDEX then. Note that we must
- fixup the type of PUSHED_DECL as well and luckily
- fixup_template_parm_index does it for us too. */
- tree fixed_up_index =
- fixup_template_parm_index (index, arglist, num_parms);
-
- DECL_INITIAL (pushed_decl) = DECL_INITIAL (parm) = fixed_up_index;
-
- /* Add this fixed up PARM to the template parms we've fixed
- up so far and use that to substitute the fixed-up
- template parms into the type of PARM. */
- TREE_VEC_ELT (fixedup_args, idx) =
- template_parm_to_arg (parm_desc);
- TREE_TYPE (parm) = tsubst (TREE_TYPE (parm), arglist,
- tf_none, NULL_TREE);
- }
-
- TREE_PURPOSE (parm_desc) =
- tsubst_template_arg (TREE_PURPOSE (parm_desc),
- arglist, tf_none, parm);
-
- pop_deferring_access_checks ();
-}
-
-/* Walk the current template parms and properly compute the canonical
- types of the dependent types created during
- cp_parser_template_parameter_list. */
-
-void
-fixup_template_parms (void)
-{
- tree arglist;
- tree parameter_vec;
- tree fixedup_args;
- int i, num_parms;
-
- parameter_vec = INNERMOST_TEMPLATE_PARMS (current_template_parms);
- if (parameter_vec == NULL_TREE)
- return;
-
- num_parms = TREE_VEC_LENGTH (parameter_vec);
-
- /* This vector contains the current innermost template parms that
- have been fixed up so far. The form of FIXEDUP_ARGS is suitable
- to be passed to tsubst* functions as their ARGS argument. */
- fixedup_args = make_tree_vec (num_parms);
-
- /* This vector contains the full set of template parms in a form
- suitable to be passed to substs functions as their ARGS
- argument. */
- arglist = current_template_args ();
- arglist = add_outermost_template_args (arglist, fixedup_args);
-
- /* Let's do the proper fixup now. */
- for (i = 0; i < num_parms; ++i)
- fixup_template_parm (TREE_VEC_ELT (parameter_vec, i),
- i, num_parms, arglist);
-}
-
/* end_template_decl is called after a template declaration is seen. */
void
@@ -4135,34 +3827,13 @@ arg_from_parm_pack_p (tree arg_pack, tree parm_pack)
{
tree expansion = TREE_VEC_ELT (ARGUMENT_PACK_ARGS (arg_pack), 0);
tree pattern = PACK_EXPANSION_PATTERN (expansion);
- /* So we have an argument_pack<P...>. We want to test if P
- is actually PARM_PACK. We will not use cp_tree_equal to
- test P and PARM_PACK because during type fixup (by
- fixup_template_parm) P can be a pre-fixup version of a
- type and PARM_PACK be its post-fixup version.
- cp_tree_equal would consider them as different even
- though we would want to consider them compatible for our
- precise purpose here.
-
- Thus we are going to consider that P and PARM_PACK are
- compatible if they have the same DECL. */
- if ((/* If ARG_PACK is a type parameter pack named by the
- same DECL as parm_pack ... */
- (TYPE_P (pattern)
- && TYPE_P (parm_pack)
- && TYPE_NAME (pattern) == TYPE_NAME (parm_pack))
- /* ... or if PARM_PACK is a non-type parameter named by the
- same DECL as ARG_PACK. Note that PARM_PACK being a
- non-type parameter means it's either a PARM_DECL or a
- TEMPLATE_PARM_INDEX. */
- || (TREE_CODE (pattern) == TEMPLATE_PARM_INDEX
- && ((TREE_CODE (parm_pack) == PARM_DECL
- && (TEMPLATE_PARM_DECL (pattern)
- == TEMPLATE_PARM_DECL (DECL_INITIAL (parm_pack))))
- || (TREE_CODE (parm_pack) == TEMPLATE_PARM_INDEX
- && (TEMPLATE_PARM_DECL (pattern)
- == TEMPLATE_PARM_DECL (parm_pack))))))
- && template_parameter_pack_p (pattern))
+ if ((TYPE_P (pattern) && same_type_p (pattern, parm_pack))
+ || (!TYPE_P (pattern) && cp_tree_equal (parm_pack, pattern)))
+ /* The argument pack that the parameter maps to is just an
+ expansion of the parameter itself, such as one would
+ find in the implicit typedef of a class inside the
+ class itself. Consider this parameter "unsubstituted",
+ so that we will maintain the outer pack expansion. */
return true;
}
return false;
@@ -6653,7 +6324,7 @@ convert_template_argument (tree parm,
argument specification is valid. */
val = convert_nontype_argument (t, orig_arg, complain);
else
- val = orig_arg;
+ val = strip_typedefs_expr (orig_arg);
if (val == NULL_TREE)
val = error_mark_node;
@@ -9278,13 +8949,8 @@ instantiate_class_template_1 (tree type)
LAMBDA_EXPR_RETURN_TYPE (lambda) = NULL_TREE;
}
- LAMBDA_EXPR_THIS_CAPTURE (lambda)
- = lookup_field_1 (type, get_identifier ("__this"), false);
-
instantiate_decl (decl, false, false);
maybe_add_lambda_conv_op (type);
-
- LAMBDA_EXPR_THIS_CAPTURE (lambda) = NULL_TREE;
}
else
gcc_assert (errorcount);
@@ -10978,11 +10644,14 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
return r;
}
-/* Substitute into the ARG_TYPES of a function type. */
+/* Substitute into the ARG_TYPES of a function type.
+ If END is a TREE_CHAIN, leave it and any following types
+ un-substituted. */
static tree
tsubst_arg_types (tree arg_types,
tree args,
+ tree end,
tsubst_flags_t complain,
tree in_decl)
{
@@ -10992,11 +10661,11 @@ tsubst_arg_types (tree arg_types,
tree expanded_args = NULL_TREE;
tree default_arg;
- if (!arg_types || arg_types == void_list_node)
+ if (!arg_types || arg_types == void_list_node || arg_types == end)
return arg_types;
remaining_arg_types = tsubst_arg_types (TREE_CHAIN (arg_types),
- args, complain, in_decl);
+ args, end, complain, in_decl);
if (remaining_arg_types == error_mark_node)
return error_mark_node;
@@ -11121,7 +10790,7 @@ tsubst_function_type (tree t,
}
/* Substitute the argument types. */
- arg_types = tsubst_arg_types (TYPE_ARG_TYPES (t), args,
+ arg_types = tsubst_arg_types (TYPE_ARG_TYPES (t), args, NULL_TREE,
complain, in_decl);
if (arg_types == error_mark_node)
return error_mark_node;
@@ -11350,8 +11019,13 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return r;
}
else
- /* We don't have an instantiation yet, so drop the typedef. */
- t = DECL_ORIGINAL_TYPE (decl);
+ {
+ /* We don't have an instantiation yet, so drop the typedef. */
+ int quals = cp_type_quals (t);
+ t = DECL_ORIGINAL_TYPE (decl);
+ t = cp_build_qualified_type_real (t, quals,
+ complain | tf_ignore_bad_quals);
+ }
}
if (type
@@ -13047,6 +12721,12 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
else if (is_capture_proxy (DECL_EXPR_DECL (t)))
{
DECL_CONTEXT (decl) = current_function_decl;
+ if (DECL_NAME (decl) == this_identifier)
+ {
+ tree lam = DECL_CONTEXT (current_function_decl);
+ lam = CLASSTYPE_LAMBDA_EXPR (lam);
+ LAMBDA_EXPR_THIS_CAPTURE (lam) = decl;
+ }
insert_capture_proxy (decl);
}
else
@@ -14555,6 +14235,7 @@ tsubst_copy_and_build (tree t,
wait until after we finish instantiating the type. */
LAMBDA_EXPR_CAPTURE_LIST (r)
= RECUR (LAMBDA_EXPR_CAPTURE_LIST (t));
+ LAMBDA_EXPR_THIS_CAPTURE (r) = NULL_TREE;
return build_lambda_object (r);
}
@@ -16716,6 +16397,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
&& !TEMPLATE_PARM_PARAMETER_PACK (parm))
return unify_parameter_pack_mismatch (explain_p, parm, arg);
+ arg = strip_typedefs_expr (arg);
TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = arg;
return unify_success (explain_p);
@@ -17203,12 +16885,9 @@ check_undeduced_parms (tree targs, tree args, tree end)
}
if (found)
{
- for (; args != end; args = TREE_CHAIN (args))
- {
- tree substed = tsubst (TREE_VALUE (args), targs, tf_none, NULL_TREE);
- if (substed == error_mark_node)
- return true;
- }
+ tree substed = tsubst_arg_types (args, targs, end, tf_none, NULL_TREE);
+ if (substed == error_mark_node)
+ return true;
}
return false;
}
@@ -20262,7 +19941,16 @@ resolve_typename_type (tree type, bool only_current_p)
/* If the SCOPE is itself a TYPENAME_TYPE, then we need to resolve
it first before we can figure out what NAME refers to. */
if (TREE_CODE (scope) == TYPENAME_TYPE)
- scope = resolve_typename_type (scope, only_current_p);
+ {
+ if (TYPENAME_IS_RESOLVING_P (scope))
+ /* Given a class template A with a dependent base with nested type C,
+ typedef typename A::C::C C will land us here, as trying to resolve
+ the initial A::C leads to the local C typedef, which leads back to
+ A::C::C. So we break the recursion now. */
+ return type;
+ else
+ scope = resolve_typename_type (scope, only_current_p);
+ }
/* If we don't know what SCOPE refers to, then we cannot resolve the
TYPENAME_TYPE. */
if (TREE_CODE (scope) == TYPENAME_TYPE)
@@ -20455,7 +20143,7 @@ make_auto (void)
TYPE_STUB_DECL (au) = TYPE_NAME (au);
TEMPLATE_TYPE_PARM_INDEX (au) = build_template_parm_index
(0, processing_template_decl + 1, processing_template_decl + 1,
- 0, TYPE_NAME (au), NULL_TREE);
+ TYPE_NAME (au), NULL_TREE);
TYPE_CANONICAL (au) = canonical_type_parameter (au);
DECL_ARTIFICIAL (TYPE_NAME (au)) = 1;
SET_DECL_TEMPLATE_PARM_P (TYPE_NAME (au));
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 248d8da9b91..57d14c11f01 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -9344,6 +9344,8 @@ maybe_add_lambda_conv_op (tree type)
DECL_NOT_REALLY_EXTERN (fn) = 1;
DECL_DECLARED_INLINE_P (fn) = 1;
DECL_ARGUMENTS (fn) = build_this_parm (fntype, TYPE_QUAL_CONST);
+ if (nested)
+ DECL_INTERFACE_KNOWN (fn) = 1;
add_method (type, fn, NULL_TREE);
@@ -9374,6 +9376,8 @@ maybe_add_lambda_conv_op (tree type)
DECL_ARGUMENTS (fn) = copy_list (DECL_CHAIN (DECL_ARGUMENTS (callop)));
for (arg = DECL_ARGUMENTS (fn); arg; arg = DECL_CHAIN (arg))
DECL_CONTEXT (arg) = fn;
+ if (nested)
+ DECL_INTERFACE_KNOWN (fn) = 1;
add_method (type, fn, NULL_TREE);
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index de9e0f60136..b5b2739ff2b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1,7 +1,7 @@
/* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
@@ -396,18 +396,14 @@ build_aggr_init_array (tree return_type, tree fn, tree slot, int nargs,
callable. */
tree
-build_aggr_init_expr (tree type, tree init, tsubst_flags_t complain)
+build_aggr_init_expr (tree type, tree init,
+ tsubst_flags_t complain ATTRIBUTE_UNUSED)
{
tree fn;
tree slot;
tree rval;
int is_ctor;
- /* Make sure that we're not trying to create an instance of an
- abstract class. */
- if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
- return error_mark_node;
-
if (TREE_CODE (init) == CALL_EXPR)
fn = CALL_EXPR_FN (init);
else if (TREE_CODE (init) == AGGR_INIT_EXPR)
@@ -466,6 +462,11 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain)
tree rval = build_aggr_init_expr (type, init, complain);
tree slot;
+ /* Make sure that we're not trying to create an instance of an
+ abstract class. */
+ if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
+ return error_mark_node;
+
if (TREE_CODE (rval) == AGGR_INIT_EXPR)
slot = AGGR_INIT_EXPR_SLOT (rval);
else if (TREE_CODE (rval) == CALL_EXPR
@@ -513,7 +514,8 @@ build_vec_init_elt (tree type, tree init, tsubst_flags_t complain)
argvec = make_tree_vector ();
if (init)
{
- tree dummy = build_dummy_object (inner_type);
+ tree init_type = strip_array_types (TREE_TYPE (init));
+ tree dummy = build_dummy_object (init_type);
if (!real_lvalue_p (init))
dummy = move (dummy);
VEC_quick_push (tree, argvec, dummy);
@@ -1097,7 +1099,7 @@ cv_unqualified (tree type)
* If T is a type that needs structural equality
its TYPE_CANONICAL (T) will be NULL.
* TYPE_CANONICAL (T) desn't carry type attributes
- and looses template parameter names. */
+ and loses template parameter names. */
tree
strip_typedefs (tree t)
@@ -1187,6 +1189,16 @@ strip_typedefs (tree t)
TYPENAME_TYPE_FULLNAME (t),
typename_type, tf_none);
break;
+ case DECLTYPE_TYPE:
+ result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t));
+ if (result == DECLTYPE_TYPE_EXPR (t))
+ return t;
+ else
+ result = (finish_decltype_type
+ (result,
+ DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P (t),
+ tf_none));
+ break;
default:
break;
}
@@ -1208,6 +1220,186 @@ strip_typedefs (tree t)
return cp_build_qualified_type (result, cp_type_quals (t));
}
+/* Like strip_typedefs above, but works on expressions, so that in
+
+ template<class T> struct A
+ {
+ typedef T TT;
+ B<sizeof(TT)> b;
+ };
+
+ sizeof(TT) is replaced by sizeof(T). */
+
+tree
+strip_typedefs_expr (tree t)
+{
+ unsigned i,n;
+ tree r, type, *ops;
+ enum tree_code code;
+
+ if (t == NULL_TREE || t == error_mark_node)
+ return t;
+
+ if (DECL_P (t) || CONSTANT_CLASS_P (t))
+ return t;
+
+ /* Some expressions have type operands, so let's handle types here rather
+ than check TYPE_P in multiple places below. */
+ if (TYPE_P (t))
+ return strip_typedefs (t);
+
+ code = TREE_CODE (t);
+ switch (code)
+ {
+ case IDENTIFIER_NODE:
+ case TEMPLATE_PARM_INDEX:
+ case OVERLOAD:
+ case BASELINK:
+ case ARGUMENT_PACK_SELECT:
+ return t;
+
+ case TRAIT_EXPR:
+ {
+ tree type1 = strip_typedefs (TRAIT_EXPR_TYPE1 (t));
+ tree type2 = strip_typedefs (TRAIT_EXPR_TYPE2 (t));
+ if (type1 == TRAIT_EXPR_TYPE1 (t)
+ && type2 == TRAIT_EXPR_TYPE2 (t))
+ return t;
+ r = copy_node (t);
+ TRAIT_EXPR_TYPE1 (t) = type1;
+ TRAIT_EXPR_TYPE2 (t) = type2;
+ return r;
+ }
+
+ case TREE_LIST:
+ {
+ VEC(tree,gc) *vec = make_tree_vector ();
+ bool changed = false;
+ tree it;
+ for (it = t; it; it = TREE_CHAIN (it))
+ {
+ tree val = strip_typedefs_expr (TREE_VALUE (t));
+ VEC_safe_push (tree, gc, vec, val);
+ if (val != TREE_VALUE (t))
+ changed = true;
+ gcc_assert (TREE_PURPOSE (it) == NULL_TREE);
+ }
+ if (changed)
+ {
+ r = NULL_TREE;
+ FOR_EACH_VEC_ELT_REVERSE (tree, vec, i, it)
+ r = tree_cons (NULL_TREE, it, r);
+ }
+ else
+ r = t;
+ release_tree_vector (vec);
+ return r;
+ }
+
+ case TREE_VEC:
+ {
+ bool changed = false;
+ VEC(tree,gc)* vec = make_tree_vector ();
+ n = TREE_VEC_LENGTH (t);
+ VEC_reserve (tree, gc, vec, n);
+ for (i = 0; i < n; ++i)
+ {
+ tree op = strip_typedefs_expr (TREE_VEC_ELT (t, i));
+ VEC_quick_push (tree, vec, op);
+ if (op != TREE_VEC_ELT (t, i))
+ changed = true;
+ }
+ if (changed)
+ {
+ r = copy_node (t);
+ for (i = 0; i < n; ++i)
+ TREE_VEC_ELT (r, i) = VEC_index (tree, vec, i);
+ }
+ else
+ r = t;
+ release_tree_vector (vec);
+ return r;
+ }
+
+ case CONSTRUCTOR:
+ {
+ bool changed = false;
+ VEC(constructor_elt,gc) *vec
+ = VEC_copy (constructor_elt, gc, CONSTRUCTOR_ELTS (t));
+ n = CONSTRUCTOR_NELTS (t);
+ type = strip_typedefs (TREE_TYPE (t));
+ for (i = 0; i < n; ++i)
+ {
+ constructor_elt *e = VEC_index (constructor_elt, vec, i);
+ tree op = strip_typedefs_expr (e->value);
+ if (op != e->value)
+ {
+ changed = true;
+ e->value = op;
+ }
+ gcc_checking_assert (e->index == strip_typedefs_expr (e->index));
+ }
+
+ if (!changed && type == TREE_TYPE (t))
+ {
+ VEC_free (constructor_elt, gc, vec);
+ return t;
+ }
+ else
+ {
+ r = copy_node (t);
+ TREE_TYPE (r) = type;
+ CONSTRUCTOR_ELTS (r) = vec;
+ return r;
+ }
+ }
+
+ case LAMBDA_EXPR:
+ gcc_unreachable ();
+
+ default:
+ break;
+ }
+
+ gcc_assert (EXPR_P (t));
+
+ n = TREE_OPERAND_LENGTH (t);
+ ops = XALLOCAVEC (tree, n);
+ type = TREE_TYPE (t);
+
+ switch (code)
+ {
+ CASE_CONVERT:
+ case IMPLICIT_CONV_EXPR:
+ case DYNAMIC_CAST_EXPR:
+ case STATIC_CAST_EXPR:
+ case CONST_CAST_EXPR:
+ case REINTERPRET_CAST_EXPR:
+ case CAST_EXPR:
+ case NEW_EXPR:
+ type = strip_typedefs (type);
+ /* fallthrough */
+
+ default:
+ for (i = 0; i < n; ++i)
+ ops[i] = strip_typedefs_expr (TREE_OPERAND (t, i));
+ break;
+ }
+
+ /* If nothing changed, return t. */
+ for (i = 0; i < n; ++i)
+ if (ops[i] != TREE_OPERAND (t, i))
+ break;
+ if (i == n && type == TREE_TYPE (t))
+ return t;
+
+ r = copy_node (t);
+ TREE_TYPE (r) = type;
+ for (i = 0; i < n; ++i)
+ TREE_OPERAND (r, i) = ops[i];
+ return r;
+}
+
/* Makes a copy of BINFO and TYPE, which is to be inherited into a
graph dominated by T. If BINFO is NULL, TYPE is a dependent base,
and we do a shallow copy. If BINFO is non-NULL, we do a deep copy.
@@ -2366,6 +2558,7 @@ cp_tree_equal (tree t1, tree t2)
case VAR_DECL:
case CONST_DECL:
+ case FIELD_DECL:
case FUNCTION_DECL:
case TEMPLATE_DECL:
case IDENTIFIER_NODE:
@@ -2380,9 +2573,6 @@ cp_tree_equal (tree t1, tree t2)
BASELINK_FUNCTIONS (t2)));
case TEMPLATE_PARM_INDEX:
- if (TEMPLATE_PARM_NUM_SIBLINGS (t1)
- != TEMPLATE_PARM_NUM_SIBLINGS (t2))
- return false;
return (TEMPLATE_PARM_IDX (t1) == TEMPLATE_PARM_IDX (t2)
&& TEMPLATE_PARM_LEVEL (t1) == TEMPLATE_PARM_LEVEL (t2)
&& (TEMPLATE_PARM_PARAMETER_PACK (t1)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index d0b2cd25d26..e3056437797 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1138,12 +1138,6 @@ comp_template_parms_position (tree t1, tree t2)
index1 = TEMPLATE_TYPE_PARM_INDEX (TYPE_MAIN_VARIANT (t1));
index2 = TEMPLATE_TYPE_PARM_INDEX (TYPE_MAIN_VARIANT (t2));
- /* If T1 and T2 belong to template parm lists of different size,
- let's assume they are different. */
- if (TEMPLATE_PARM_NUM_SIBLINGS (index1)
- != TEMPLATE_PARM_NUM_SIBLINGS (index2))
- return false;
-
/* Then compare their relative position. */
if (TEMPLATE_PARM_IDX (index1) != TEMPLATE_PARM_IDX (index2)
|| TEMPLATE_PARM_LEVEL (index1) != TEMPLATE_PARM_LEVEL (index2)
diff --git a/gcc/cse.c b/gcc/cse.c
index 6424bb1864f..0904ee688b6 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2555,7 +2555,7 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
Store 1 in DO_NOT_RECORD_P if any subexpression is volatile.
If HASH_ARG_IN_MEMORY_P is not NULL, store 1 in it if X contains
- a MEM rtx which does not have the RTX_UNCHANGING_P bit set.
+ a MEM rtx which does not have the MEM_READONLY_P flag set.
Note that cse_insn knows that the hash code of a MEM expression
is just (int) MEM plus the hash code of the address. */
@@ -2571,7 +2571,7 @@ hash_rtx (const_rtx x, enum machine_mode mode, int *do_not_record_p,
/* Hash an rtx X for cse via hash_rtx.
Stores 1 in do_not_record if any subexpression is volatile.
Stores 1 in hash_arg_in_memory if X contains a mem rtx which
- does not have the RTX_UNCHANGING_P bit set. */
+ does not have the MEM_READONLY_P flag set. */
static inline unsigned
canon_hash (rtx x, enum machine_mode mode)
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index af43721ff64..798dd9570f9 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -4462,9 +4462,9 @@ releases mishandled unaligned relocations on @code{sparc-*-*} targets.
@end html
@heading @anchor{sparc64-x-solaris2}sparc64-*-solaris2*
-When configuring the GNU Multiple Precision Library (GMP) or the
-MPFR library, the canonical target triplet must be specified as
-the @command{build} parameter on the configure line. For example
+When configuring the GNU Multiple Precision Library (GMP), the MPFR
+library or the MPC library, the canonical target triplet must be specified
+as the @command{build} parameter on the configure line. For example
on a Solaris 9 system:
@smallexample
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 89de8f0f560..71d57b79121 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11436,9 +11436,6 @@ defined.
@opindex mmcu
Specify Atmel AVR instruction set architectures (ISA) or MCU type.
-For a complete list of @var{mcu} values that are supported by @command{avr-gcc},
-see the compiler output when called with the @option{--help=target}
-command line option.
The default for this option is@tie{}@code{avr2}.
GCC supports the following AVR devices and ISAs:
@@ -11447,22 +11444,22 @@ GCC supports the following AVR devices and ISAs:
@item avr2
``Classic'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at90c8534}, @code{at90s2313},
-@code{at90s2323}, @code{at90s2333}, @code{at90s2343},
-@code{at90s4414}, @code{at90s4433}, @code{at90s4434},
-@code{at90s8515}, @code{at90s8535}, @code{attiny22}, @code{attiny26}.
+@*@var{mcu}@tie{}= @code{attiny22}, @code{attiny26}, @code{at90c8534},
+@code{at90s2313}, @code{at90s2323}, @code{at90s2333},
+@code{at90s2343}, @code{at90s4414}, @code{at90s4433},
+@code{at90s4434}, @code{at90s8515}, @code{at90s8535}.
@item avr25
``Classic'' devices with up to 8@tie{}KiB of program memory and with
the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{at86rf401}, @code{ata6289}, @code{attiny13},
-@code{attiny13a}, @code{attiny2313}, @code{attiny2313a},
-@code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261},
-@code{attiny261a}, @code{attiny4313}, @code{attiny43u},
+@*@var{mcu}@tie{}= @code{ata6289}, @code{attiny13}, @code{attiny13a},
+@code{attiny2313}, @code{attiny2313a}, @code{attiny24},
+@code{attiny24a}, @code{attiny25}, @code{attiny261},
+@code{attiny261a}, @code{attiny43u}, @code{attiny4313},
@code{attiny44}, @code{attiny44a}, @code{attiny45}, @code{attiny461},
@code{attiny461a}, @code{attiny48}, @code{attiny84}, @code{attiny84a},
@code{attiny85}, @code{attiny861}, @code{attiny861a}, @code{attiny87},
-@code{attiny88}.
+@code{attiny88}, @code{at86rf401}.
@item avr3
``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
@@ -11470,57 +11467,58 @@ the @code{MOVW} instruction.
@item avr31
``Classic'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at43usb320}, @code{atmega103}.
+@*@var{mcu}@tie{}= @code{atmega103}, @code{at43usb320}.
@item avr35
``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program
memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{at90usb162}, @code{at90usb82},
-@code{atmega16u2}, @code{atmega32u2}, @code{atmega8u2},
-@code{attiny167}.
+@*@var{mcu}@tie{}= @code{atmega16u2}, @code{atmega32u2},
+@code{atmega8u2}, @code{attiny167}, @code{at90usb162},
+@code{at90usb82}.
@item avr4
``Enhanced'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b},
-@code{at90pwm3}, @code{at90pwm3b}, @code{at90pwm81}, @code{atmega48},
-@code{atmega48a}, @code{atmega48p}, @code{atmega8}, @code{atmega8515},
-@code{atmega8535}, @code{atmega88}, @code{atmega88a},
-@code{atmega88p}, @code{atmega88pa}, @code{atmega8hva}.
+@*@var{mcu}@tie{}= @code{atmega48}, @code{atmega48a},
+@code{atmega48p}, @code{atmega8}, @code{atmega8hva},
+@code{atmega8515}, @code{atmega8535}, @code{atmega88},
+@code{atmega88a}, @code{atmega88p}, @code{atmega88pa},
+@code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b}, @code{at90pwm3},
+@code{at90pwm3b}, @code{at90pwm81}.
@item avr5
``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at90can32}, @code{at90can64},
-@code{at90pwm216}, @code{at90pwm316}, @code{at90scr100},
-@code{at90usb646}, @code{at90usb647}, @code{at94k}, @code{atmega16},
-@code{atmega161}, @code{atmega162}, @code{atmega163},
-@code{atmega164a}, @code{atmega164p}, @code{atmega165},
-@code{atmega165a}, @code{atmega165p}, @code{atmega168},
-@code{atmega168a}, @code{atmega168p}, @code{atmega169},
-@code{atmega169a}, @code{atmega169p}, @code{atmega169pa},
-@code{atmega16a}, @code{atmega16hva}, @code{atmega16hva2},
-@code{atmega16hvb}, @code{atmega16m1}, @code{atmega16u4},
-@code{atmega32}, @code{atmega323}, @code{atmega324a},
-@code{atmega324p}, @code{atmega324pa}, @code{atmega325},
+@*@var{mcu}@tie{}= @code{atmega16}, @code{atmega16a},
+@code{atmega16hva}, @code{atmega16hva2}, @code{atmega16hvb},
+@code{atmega16m1}, @code{atmega16u4}, @code{atmega161},
+@code{atmega162}, @code{atmega163}, @code{atmega164a},
+@code{atmega164p}, @code{atmega165}, @code{atmega165a},
+@code{atmega165p}, @code{atmega168}, @code{atmega168a},
+@code{atmega168p}, @code{atmega169}, @code{atmega169a},
+@code{atmega169p}, @code{atmega169pa}, @code{atmega32},
+@code{atmega32c1}, @code{atmega32hvb}, @code{atmega32m1},
+@code{atmega32u4}, @code{atmega32u6}, @code{atmega323},
+@code{atmega324a}, @code{atmega324p}, @code{atmega324pa},
+@code{atmega325}, @code{atmega325a}, @code{atmega325p},
@code{atmega3250}, @code{atmega3250a}, @code{atmega3250p},
-@code{atmega325a}, @code{atmega325p}, @code{atmega328},
-@code{atmega328p}, @code{atmega329}, @code{atmega3290},
-@code{atmega3290a}, @code{atmega3290p}, @code{atmega329a},
-@code{atmega329p}, @code{atmega329pa}, @code{atmega32c1},
-@code{atmega32hvb}, @code{atmega32m1}, @code{atmega32u4},
-@code{atmega32u6}, @code{atmega406}, @code{atmega64},
-@code{atmega640}, @code{atmega644}, @code{atmega644a},
-@code{atmega644p}, @code{atmega644pa}, @code{atmega645},
-@code{atmega6450}, @code{atmega6450a}, @code{atmega6450p},
-@code{atmega645a}, @code{atmega645p}, @code{atmega649},
-@code{atmega6490}, @code{atmega649a}, @code{atmega649p},
-@code{atmega64c1}, @code{atmega64hve}, @code{atmega64m1},
+@code{atmega328}, @code{atmega328p}, @code{atmega329},
+@code{atmega329a}, @code{atmega329p}, @code{atmega329pa},
+@code{atmega3290}, @code{atmega3290a}, @code{atmega3290p},
+@code{atmega406}, @code{atmega64}, @code{atmega64c1},
+@code{atmega64hve}, @code{atmega64m1}, @code{atmega640},
+@code{atmega644}, @code{atmega644a}, @code{atmega644p},
+@code{atmega644pa}, @code{atmega645}, @code{atmega645a},
+@code{atmega645p}, @code{atmega6450}, @code{atmega6450a},
+@code{atmega6450p}, @code{atmega649}, @code{atmega649a},
+@code{atmega649p}, @code{atmega6490}, @code{at90can32},
+@code{at90can64}, @code{at90pwm216}, @code{at90pwm316},
+@code{at90scr100}, @code{at90usb646}, @code{at90usb647}, @code{at94k},
@code{m3000}.
@item avr51
``Enhanced'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at90can128}, @code{at90usb1286},
-@code{at90usb1287}, @code{atmega128}, @code{atmega1280},
-@code{atmega1281}, @code{atmega1284p}, @code{atmega128rfa1}.
+@*@var{mcu}@tie{}= @code{atmega128}, @code{atmega128rfa1},
+@code{atmega1280}, @code{atmega1281}, @code{atmega1284p},
+@code{at90can128}, @code{at90usb1286}, @code{at90usb1287}.
@item avr6
``Enhanced'' devices with 3-byte PC, i.e.@: with more than
@@ -11558,8 +11556,8 @@ more than 64@tie{}KiB of RAM.
@item avr1
This ISA is implemented by the minimal AVR core and supported for
assembler only.
-@*@var{mcu}@tie{}= @code{at90s1200}, @code{attiny11}, @code{attiny12},
-@code{attiny15}, @code{attiny28}.
+@*@var{mcu}@tie{}= @code{attiny11}, @code{attiny12}, @code{attiny15},
+@code{attiny28}, @code{at90s1200}.
@end table
@@ -11620,10 +11618,12 @@ section on @code{EIND} and linker stubs below.
@item -mshort-calls
@opindex mshort-calls
+This option has been deprecated and will be removed in GCC 4.8.
+See @code{-mrelax} for a replacement.
+
Use @code{RCALL}/@code{RJMP} instructions even on devices with
16@tie{}KiB or more of program memory, i.e.@: on devices that
have the @code{CALL} and @code{JMP} instructions.
-See also the @code{-mrelax} command line option.
@item -msp8
@opindex msp8
@@ -11854,6 +11854,23 @@ For even more AVR-specific built-in macros see
@table @code
+@item __AVR_ARCH__
+Build-in macro that resolves to a decimal number that identifies the
+architecture and depends on the @code{-mmcu=@var{mcu}} option.
+Possible values are:
+
+@code{2}, @code{25}, @code{3}, @code{31}, @code{35},
+@code{4}, @code{5}, @code{51}, @code{6}, @code{102}, @code{104},
+@code{105}, @code{106}, @code{107}
+
+for @var{mcu}=@code{avr2}, @code{avr25}, @code{avr3},
+@code{avr31}, @code{avr35}, @code{avr4}, @code{avr5}, @code{avr51},
+@code{avr6}, @code{avrxmega2}, @code{avrxmega4}, @code{avrxmega5},
+@code{avrxmega6}, @code{avrxmega7}, respectively.
+If @var{mcu} specifies a device, this built-in macro is set
+accordingly. For example, with @code{-mmcu=atmega8} the macro will be
+defined to @code{4}.
+
@item __AVR_@var{Device}__
Setting @code{-mmcu=@var{device}} defines this built-in macro which reflects
the device's name. For example, @code{-mmcu=atmega8} defines the
@@ -11866,6 +11883,9 @@ the device name as from the AVR user manual. The difference between
@var{Device} in the built-in macro and @var{device} in
@code{-mmcu=@var{device}} is that the latter is always lowercase.
+If @var{device} is not a device but only a core architecture like
+@code{avr51}, this macro will not be defined.
+
@item __AVR_HAVE_ELPM__
The device has the the @code{ELPM} instruction.
diff --git a/gcc/dse.c b/gcc/dse.c
index be482e93800..1e0b678a1be 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -996,7 +996,32 @@ delete_dead_store_insn (insn_info_t insn_info)
insn_info->wild_read = false;
}
-/* Check if EXPR can possibly escape the current function scope. */
+/* Return whether DECL, a local variable, can possibly escape the current
+ function scope. */
+
+static bool
+local_variable_can_escape (tree decl)
+{
+ if (TREE_ADDRESSABLE (decl))
+ return true;
+
+ /* If this is a partitioned variable, we need to consider all the variables
+ in the partition. This is necessary because a store into one of them can
+ be replaced with a store into another and this may not change the outcome
+ of the escape analysis. */
+ if (cfun->gimple_df->decls_to_pointers != NULL)
+ {
+ void *namep
+ = pointer_map_contains (cfun->gimple_df->decls_to_pointers, decl);
+ if (namep)
+ return TREE_ADDRESSABLE (*(tree *)namep);
+ }
+
+ return false;
+}
+
+/* Return whether EXPR can possibly escape the current function scope. */
+
static bool
can_escape (tree expr)
{
@@ -1005,7 +1030,11 @@ can_escape (tree expr)
return true;
base = get_base_address (expr);
if (DECL_P (base)
- && !may_be_aliased (base))
+ && !may_be_aliased (base)
+ && !(TREE_CODE (base) == VAR_DECL
+ && !DECL_EXTERNAL (base)
+ && !TREE_STATIC (base)
+ && local_variable_can_escape (base)))
return false;
return true;
}
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index ad2985070b5..4485b558fe0 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -6059,10 +6059,11 @@ fold_binary_op_with_conditional_arg (location_t loc,
}
/* This transformation is only worthwhile if we don't have to wrap ARG
- in a SAVE_EXPR and the operation can be simplified on at least one
- of the branches once its pushed inside the COND_EXPR. */
+ in a SAVE_EXPR and the operation can be simplified without recursing
+ on at least one of the branches once its pushed inside the COND_EXPR. */
if (!TREE_CONSTANT (arg)
&& (TREE_SIDE_EFFECTS (arg)
+ || TREE_CODE (arg) == COND_EXPR || TREE_CODE (arg) == VEC_COND_EXPR
|| TREE_CONSTANT (true_value) || TREE_CONSTANT (false_value)))
return NULL_TREE;
@@ -6814,12 +6815,14 @@ fold_sign_changed_comparison (location_t loc, enum tree_code code, tree type,
&& TREE_TYPE (TREE_OPERAND (arg1, 0)) == inner_type))
return NULL_TREE;
- if ((TYPE_UNSIGNED (inner_type) != TYPE_UNSIGNED (outer_type)
- || POINTER_TYPE_P (inner_type) != POINTER_TYPE_P (outer_type))
+ if (TYPE_UNSIGNED (inner_type) != TYPE_UNSIGNED (outer_type)
&& code != NE_EXPR
&& code != EQ_EXPR)
return NULL_TREE;
+ if (POINTER_TYPE_P (inner_type) != POINTER_TYPE_P (outer_type))
+ return NULL_TREE;
+
if (TREE_CODE (arg1) == INTEGER_CST)
arg1 = force_fit_type_double (inner_type, tree_to_double_int (arg1),
0, TREE_OVERFLOW (arg1));
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index fc827cb7061..e2766538360 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,29 @@
+2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55314
+ Backport from trunk
+ * resolve.c (resolve_allocate_deallocate): Compare all
+ subscripts when deciding if to reject a (de)allocate
+ statement.
+
+2012-11-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55352
+ * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
+ but unused module variables which are in a namelist or common block.
+
+2012-11-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54917
+ * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
+ Handle BT_CLASS.
+
+2012-10-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54784
+ * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
+ to the _data component for polymorphic allocation with SOURCE.
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 33913aa8634..bbc1c2208fb 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -7280,8 +7280,8 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
}
}
- /* Check that an allocate-object appears only once in the statement.
- FIXME: Checking derived types is disabled. */
+ /* Check that an allocate-object appears only once in the statement. */
+
for (p = code->ext.alloc.list; p; p = p->next)
{
pe = p->expr;
@@ -7329,11 +7329,18 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
if (pr->next && qr->next)
{
+ int i;
gfc_array_ref *par = &(pr->u.ar);
gfc_array_ref *qar = &(qr->u.ar);
- if (gfc_dep_compare_expr (par->start[0],
- qar->start[0]) != 0)
- break;
+
+ for (i=0; i<par->dimen; i++)
+ {
+ if ((par->start[i] != NULL
+ || qar->start[i] != NULL)
+ && gfc_dep_compare_expr (par->start[i],
+ qar->start[i]) != 0)
+ goto break_label;
+ }
}
}
else
@@ -7345,6 +7352,8 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
pr = pr->next;
qr = qr->next;
}
+ break_label:
+ ;
}
}
}
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index 63878959b47..213ee52d307 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -120,6 +120,7 @@ gfc_target_expr_size (gfc_expr *e)
case BT_HOLLERITH:
return e->representation.length;
case BT_DERIVED:
+ case BT_CLASS:
{
/* Determine type size without clobbering the typespec for ISO C
binding types. */
@@ -563,6 +564,9 @@ gfc_target_interpret_expr (unsigned char *buffer, size_t buffer_size,
gfc_interpret_character (buffer, buffer_size, result);
break;
+ case BT_CLASS:
+ result->ts = CLASS_DATA (result)->ts;
+ /* Fall through. */
case BT_DERIVED:
result->representation.length =
gfc_interpret_derived (buffer, buffer_size, result);
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index e497fd6ede3..f225ab3b8c0 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -4586,22 +4586,25 @@ generate_local_decl (gfc_symbol * sym)
}
/* Warn for unused variables, but not if they're inside a common
- block, a namelist, or are use-associated. */
+ block or a namelist. */
else if (warn_unused_variable
- && !(sym->attr.in_common || sym->attr.use_assoc || sym->mark
- || sym->attr.in_namelist))
+ && !(sym->attr.in_common || sym->mark || sym->attr.in_namelist))
{
- gfc_warning ("Unused variable '%s' declared at %L", sym->name,
- &sym->declared_at);
- if (sym->backend_decl != NULL_TREE)
- TREE_NO_WARNING(sym->backend_decl) = 1;
- }
- else if (warn_unused_variable && sym->attr.use_only)
- {
- gfc_warning ("Unused module variable '%s' which has been explicitly "
- "imported at %L", sym->name, &sym->declared_at);
- if (sym->backend_decl != NULL_TREE)
- TREE_NO_WARNING(sym->backend_decl) = 1;
+ if (sym->attr.use_only)
+ {
+ gfc_warning ("Unused module variable '%s' which has been "
+ "explicitly imported at %L", sym->name,
+ &sym->declared_at);
+ if (sym->backend_decl != NULL_TREE)
+ TREE_NO_WARNING(sym->backend_decl) = 1;
+ }
+ else if (!sym->attr.use_assoc)
+ {
+ gfc_warning ("Unused variable '%s' declared at %L",
+ sym->name, &sym->declared_at);
+ if (sym->backend_decl != NULL_TREE)
+ TREE_NO_WARNING(sym->backend_decl) = 1;
+ }
}
/* For variable length CHARACTER parameters, the PARM_DECL already
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index bb3a89084e0..630816ed401 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -5087,7 +5087,7 @@ gfc_trans_allocate (gfc_code * code)
gfc_actual_arglist *actual;
gfc_expr *ppc;
gfc_code *ppc_code;
- gfc_ref *dataref;
+ gfc_ref *ref, *dataref;
/* Do a polymorphic deep copy. */
actual = gfc_get_actual_arglist ();
@@ -5099,13 +5099,15 @@ gfc_trans_allocate (gfc_code * code)
actual->next->expr->ts.type = BT_CLASS;
gfc_add_data_component (actual->next->expr);
- dataref = actual->next->expr->ref;
+ dataref = NULL;
/* Make sure we go up through the reference chain to
the _data reference, where the arrayspec is found. */
- while (dataref->next && dataref->next->type != REF_ARRAY)
- dataref = dataref->next;
+ for (ref = actual->next->expr->ref; ref; ref = ref->next)
+ if (ref->type == REF_COMPONENT
+ && strcmp (ref->u.c.component->name, "_data") == 0)
+ dataref = ref;
- if (dataref->u.c.component->as)
+ if (dataref && dataref->u.c.component->as)
{
int dim;
gfc_expr *temp;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index c1cdca7b423..64d7ac6dfc0 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1663,6 +1663,10 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap)
{
bitmap_iterator bi;
unsigned bb_index;
+ rtx x_addr;
+
+ x_addr = get_addr (XEXP (x, 0));
+ x_addr = canon_rtx (x_addr);
/* First handle all the blocks with calls. We don't need to
do any list walking for them. */
@@ -1671,27 +1675,27 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap)
RESET_BIT (bmap[bb_index], indx);
}
- /* Now iterate over the blocks which have memory modifications
- but which do not have any calls. */
- EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
- blocks_with_calls,
- 0, bb_index, bi)
- {
- VEC (modify_pair,heap) *list
- = canon_modify_mem_list[bb_index];
- modify_pair *pair;
- unsigned ix;
+ /* Now iterate over the blocks which have memory modifications
+ but which do not have any calls. */
+ EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
+ blocks_with_calls,
+ 0, bb_index, bi)
+ {
+ VEC (modify_pair,heap) *list
+ = canon_modify_mem_list[bb_index];
+ modify_pair *pair;
+ unsigned ix;
- FOR_EACH_VEC_ELT_REVERSE (modify_pair, list, ix, pair)
- {
- rtx dest = pair->dest;
- rtx dest_addr = pair->dest_addr;
+ FOR_EACH_VEC_ELT_REVERSE (modify_pair, list, ix, pair)
+ {
+ rtx dest = pair->dest;
+ rtx dest_addr = pair->dest_addr;
- if (canon_true_dependence (dest, GET_MODE (dest),
- dest_addr, x, NULL_RTX))
- RESET_BIT (bmap[bb_index], indx);
- }
- }
+ if (canon_true_dependence (dest, GET_MODE (dest),
+ dest_addr, x, x_addr))
+ RESET_BIT (bmap[bb_index], indx);
+ }
+ }
}
x = XEXP (x, 0);
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 3ff64ffdd7d..f0a4d81c785 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -308,7 +308,7 @@ struct ptr_data
enum gt_types_enum type;
};
-#define POINTER_HASH(x) (hashval_t)((long)x >> 3)
+#define POINTER_HASH(x) (hashval_t)((intptr_t)x >> 3)
/* Register an object in the hash table. */
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 5980854d94d..0210ccfedb9 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -115,7 +115,8 @@ can_refer_decl_in_current_unit_p (tree decl)
tree
canonicalize_constructor_val (tree cval)
{
- STRIP_USELESS_TYPE_CONVERSION (cval);
+ tree orig_cval = cval;
+ STRIP_NOPS (cval);
if (TREE_CODE (cval) == POINTER_PLUS_EXPR
&& TREE_CODE (TREE_OPERAND (cval, 1)) == INTEGER_CST)
{
@@ -146,8 +147,12 @@ canonicalize_constructor_val (tree cval)
/* Fixup types in global initializers. */
if (TREE_TYPE (TREE_TYPE (cval)) != TREE_TYPE (TREE_OPERAND (cval, 0)))
cval = build_fold_addr_expr (TREE_OPERAND (cval, 0));
+
+ if (!useless_type_conversion_p (TREE_TYPE (orig_cval), TREE_TYPE (cval)))
+ cval = fold_convert (TREE_TYPE (orig_cval), cval);
+ return cval;
}
- return cval;
+ return orig_cval;
}
/* If SYM is a constant variable with known value, return the value.
@@ -567,7 +572,7 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
unlink_stmt_vdef (stmt);
release_defs (stmt);
}
- gsi_remove (si_p, true);
+ gsi_replace (si_p, gimple_build_nop (), true);
return;
}
}
diff --git a/gcc/gimple.h b/gcc/gimple.h
index e75a4a2ac0c..12d42e16db2 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1083,6 +1083,24 @@ struct gimplify_ctx
bool in_cleanup_point_expr;
};
+/* Return true if gimplify_one_sizepos doesn't need to gimplify
+ expr (when in TYPE_SIZE{,_UNIT} and similar type/decl size/bitsize
+ fields). */
+static inline bool
+is_gimple_sizepos (tree expr)
+{
+ /* gimplify_one_sizepos doesn't need to do anything if the value isn't there,
+ is constant, or contains A PLACEHOLDER_EXPR. We also don't want to do
+ anything if it's already a VAR_DECL. If it's a VAR_DECL from another
+ function, the gimplifier will want to replace it with a new variable,
+ but that will cause problems if this type is from outside the function.
+ It's OK to have that here. */
+ return (expr == NULL_TREE
+ || TREE_CONSTANT (expr)
+ || TREE_CODE (expr) == VAR_DECL
+ || CONTAINS_PLACEHOLDER_P (expr));
+}
+
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
bool (*) (tree), fallback_t);
extern void gimplify_type_sizes (tree, gimple_seq *);
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 65b99d20514..8910d2fb9c5 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -119,6 +119,19 @@ mark_addressable (tree x)
&& TREE_CODE (x) != RESULT_DECL)
return;
TREE_ADDRESSABLE (x) = 1;
+
+ /* Also mark the artificial SSA_NAME that points to the partition of X. */
+ if (TREE_CODE (x) == VAR_DECL
+ && !DECL_EXTERNAL (x)
+ && !TREE_STATIC (x)
+ && cfun->gimple_df != NULL
+ && cfun->gimple_df->decls_to_pointers != NULL)
+ {
+ void *namep
+ = pointer_map_contains (cfun->gimple_df->decls_to_pointers, x);
+ if (namep)
+ TREE_ADDRESSABLE (*(tree *)namep) = 1;
+ }
}
/* Return a hash value for a formal temporary table entry. */
@@ -2123,15 +2136,6 @@ gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
if (TREE_OPERAND (t, 3) == NULL_TREE)
{
tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
- /* FIXME google - In some edge cases, ELMT_TYPE may
- not have been laid out. This causes an ICE later
- (PR 55245). We call layout_type if ELMT_TYPE is not
- yet complete, but this is not where this bug should
- be fixed. The FE should have laid out all the types
- before gimplification. When a proper fix for PR
- 55245 is available, remove this. */
- if (!COMPLETE_TYPE_P (elmt_type))
- layout_type (elmt_type);
tree elmt_size = unshare_expr (array_ref_element_size (t));
tree factor = size_int (TYPE_ALIGN_UNIT (elmt_type));
@@ -8012,9 +8016,7 @@ gimplify_one_sizepos (tree *expr_p, gimple_seq *stmt_p)
a VAR_DECL. If it's a VAR_DECL from another function, the gimplifier
will want to replace it with a new variable, but that will cause problems
if this type is from outside the function. It's OK to have that here. */
- if (expr == NULL_TREE || TREE_CONSTANT (expr)
- || TREE_CODE (expr) == VAR_DECL
- || CONTAINS_PLACEHOLDER_P (expr))
+ if (is_gimple_sizepos (expr))
return;
type = TREE_TYPE (expr);
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 2165911fa72..d78924ba60c 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,14 @@
+2012-10-30 Ian Lance Taylor <iant@google.com>
+
+ * lang.opt (-fgo-relative-import-path): New option.
+ * go-lang.c (go_relative_import_path): New static variable.
+ (go_langhook_init): Pass go_relative_import_path to
+ go_create_gogo.
+ (go_langhook_handle_option): Handle -fgo-relative-import-path.
+ * go-c.h (go_create_gogo): Update declaration.
+ * gccgo.texi (Invoking gccgo): Document
+ -fgo-relative-import-path.
+
2012-09-20 Ian Lance Taylor <iant@google.com>
* Make-lang.in (go/gogo.o): Depend on filenames.h.
diff --git a/gcc/go/gccgo.texi b/gcc/go/gccgo.texi
index a5e37e76e80..91930c812f6 100644
--- a/gcc/go/gccgo.texi
+++ b/gcc/go/gccgo.texi
@@ -184,6 +184,12 @@ Using either @option{-fgo-pkgpath} or @option{-fgo-prefix} disables
the special treatment of the @code{main} package and permits that
package to be imported like any other.
+@item -fgo-relative-import-path=@var{dir}
+@cindex @option{-fgo-relative-import-path}
+A relative import is an import that starts with @file{./} or
+@file{../}. If this option is used, @command{gccgo} will use
+@var{dir} as a prefix for the relative import when searching for it.
+
@item -frequire-return-statement
@itemx -fno-require-return-statement
@cindex @option{-frequire-return-statement}
diff --git a/gcc/go/go-c.h b/gcc/go/go-c.h
index d46a08796e3..ea59fb6b39a 100644
--- a/gcc/go/go-c.h
+++ b/gcc/go/go-c.h
@@ -42,7 +42,8 @@ extern int go_enable_optimize (const char*);
extern void go_add_search_path (const char*);
extern void go_create_gogo (int int_type_size, int pointer_size,
- const char* pkgpath, const char *prefix);
+ const char* pkgpath, const char *prefix,
+ const char *relative_import_path);
extern void go_parse_input_files (const char**, unsigned int,
bool only_check_syntax,
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index f02f769252b..61ca1478be6 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -85,6 +85,7 @@ struct GTY(()) language_function
static const char *go_pkgpath = NULL;
static const char *go_prefix = NULL;
+static const char *go_relative_import_path = NULL;
/* Language hooks. */
@@ -101,7 +102,8 @@ go_langhook_init (void)
to, e.g., unsigned_char_type_node) but before calling
build_common_builtin_nodes (because it calls, indirectly,
go_type_for_size). */
- go_create_gogo (INT_TYPE_SIZE, POINTER_SIZE, go_pkgpath, go_prefix);
+ go_create_gogo (INT_TYPE_SIZE, POINTER_SIZE, go_pkgpath, go_prefix,
+ go_relative_import_path);
build_common_builtin_nodes ();
@@ -240,6 +242,10 @@ go_langhook_handle_option (
go_prefix = arg;
break;
+ case OPT_fgo_relative_import_path_:
+ go_relative_import_path = arg;
+ break;
+
default:
/* Just return 1 to indicate that the option is valid. */
break;
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 3fa1cd6bc23..e16cd84d0a0 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -89,10 +89,11 @@ Expression::do_traverse(Traverse*)
// expression is being discarded. By default, we give an error.
// Expressions with side effects override.
-void
+bool
Expression::do_discarding_value()
{
this->unused_value_error();
+ return false;
}
// This virtual function is called to export expressions. This will
@@ -109,7 +110,7 @@ Expression::do_export(Export*) const
void
Expression::unused_value_error()
{
- error_at(this->location(), "value computed is not used");
+ this->report_error(_("value computed is not used"));
}
// Note that this expression is an error. This is called by children
@@ -789,9 +790,9 @@ class Error_expression : public Expression
return true;
}
- void
+ bool
do_discarding_value()
- { }
+ { return true; }
Type*
do_type()
@@ -1152,9 +1153,9 @@ class Sink_expression : public Expression
{ }
protected:
- void
+ bool
do_discarding_value()
- { }
+ { return true; }
Type*
do_type();
@@ -5323,13 +5324,19 @@ Binary_expression::do_numeric_constant_value(Numeric_constant* nc) const
// Note that the value is being discarded.
-void
+bool
Binary_expression::do_discarding_value()
{
if (this->op_ == OPERATOR_OROR || this->op_ == OPERATOR_ANDAND)
- this->right_->discarding_value();
+ {
+ this->right_->discarding_value();
+ return true;
+ }
else
- this->unused_value_error();
+ {
+ this->unused_value_error();
+ return false;
+ }
}
// Get type.
@@ -6528,7 +6535,7 @@ class Builtin_call_expression : public Call_expression
bool
do_numeric_constant_value(Numeric_constant*) const;
- void
+ bool
do_discarding_value();
Type*
@@ -7330,7 +7337,7 @@ Builtin_call_expression::do_numeric_constant_value(Numeric_constant* nc) const
// discarding the value of an ordinary function call, but we do for
// builtin functions, purely for consistency with the gc compiler.
-void
+bool
Builtin_call_expression::do_discarding_value()
{
switch (this->code_)
@@ -7351,7 +7358,7 @@ Builtin_call_expression::do_discarding_value()
case BUILTIN_OFFSETOF:
case BUILTIN_SIZEOF:
this->unused_value_error();
- break;
+ return false;
case BUILTIN_CLOSE:
case BUILTIN_COPY:
@@ -7360,7 +7367,7 @@ Builtin_call_expression::do_discarding_value()
case BUILTIN_PRINT:
case BUILTIN_PRINTLN:
case BUILTIN_RECOVER:
- break;
+ return true;
}
}
@@ -8506,6 +8513,16 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function,
return Expression::make_cast(this->fn_->type(), this->args_->front(),
loc);
+ // Because do_type will return an error type and thus prevent future
+ // errors, check for that case now to ensure that the error gets
+ // reported.
+ if (this->get_function_type() == NULL)
+ {
+ if (!this->fn_->type()->is_error())
+ this->report_error(_("expected function"));
+ return Expression::make_error(loc);
+ }
+
// Recognize a call to a builtin function.
Func_expression* fne = this->fn_->func_expression();
if (fne != NULL
@@ -9195,6 +9212,9 @@ Call_expression::do_get_tree(Translate_context* context)
}
}
+ if (func == NULL)
+ fn = save_expr(fn);
+
tree ret = build_call_array(excess_type != NULL_TREE ? excess_type : rettype,
fn, nargs, args);
delete[] args;
@@ -9228,6 +9248,24 @@ Call_expression::do_get_tree(Translate_context* context)
if (this->results_ != NULL)
ret = this->set_results(context, ret);
+ // We can't unwind the stack past a call to nil, so we need to
+ // insert an explicit check so that the panic can be recovered.
+ if (func == NULL)
+ {
+ tree compare = fold_build2_loc(location.gcc_location(), EQ_EXPR,
+ boolean_type_node, fn,
+ fold_convert_loc(location.gcc_location(),
+ TREE_TYPE(fn),
+ null_pointer_node));
+ tree crash = build3_loc(location.gcc_location(), COND_EXPR,
+ void_type_node, compare,
+ gogo->runtime_error(RUNTIME_ERROR_NIL_DEREFERENCE,
+ location),
+ NULL_TREE);
+ ret = fold_build2_loc(location.gcc_location(), COMPOUND_EXPR,
+ TREE_TYPE(ret), crash, ret);
+ }
+
this->tree_ = ret;
return ret;
@@ -14079,7 +14117,7 @@ Numeric_constant::check_int_type(Integer_type* type, bool issue_error,
bool
Numeric_constant::check_float_type(Float_type* type, bool issue_error,
- Location location) const
+ Location location)
{
mpfr_t val;
switch (this->classification_)
@@ -14132,6 +14170,29 @@ Numeric_constant::check_float_type(Float_type* type, bool issue_error,
}
ret = exp <= max_exp;
+
+ if (ret)
+ {
+ // Round the constant to the desired type.
+ mpfr_t t;
+ mpfr_init(t);
+ switch (type->bits())
+ {
+ case 32:
+ mpfr_set_prec(t, 24);
+ break;
+ case 64:
+ mpfr_set_prec(t, 53);
+ break;
+ default:
+ go_unreachable();
+ }
+ mpfr_set(t, val, GMP_RNDN);
+ mpfr_set(val, t, GMP_RNDN);
+ mpfr_clear(t);
+
+ this->set_float(type, val);
+ }
}
mpfr_clear(val);
@@ -14146,7 +14207,7 @@ Numeric_constant::check_float_type(Float_type* type, bool issue_error,
bool
Numeric_constant::check_complex_type(Complex_type* type, bool issue_error,
- Location location) const
+ Location location)
{
if (type->is_abstract())
return true;
@@ -14165,46 +14226,77 @@ Numeric_constant::check_complex_type(Complex_type* type, bool issue_error,
}
mpfr_t real;
+ mpfr_t imag;
switch (this->classification_)
{
case NC_INT:
case NC_RUNE:
mpfr_init_set_z(real, this->u_.int_val, GMP_RNDN);
+ mpfr_init_set_ui(imag, 0, GMP_RNDN);
break;
case NC_FLOAT:
mpfr_init_set(real, this->u_.float_val, GMP_RNDN);
+ mpfr_init_set_ui(imag, 0, GMP_RNDN);
break;
case NC_COMPLEX:
- if (!mpfr_nan_p(this->u_.complex_val.imag)
- && !mpfr_inf_p(this->u_.complex_val.imag)
- && !mpfr_zero_p(this->u_.complex_val.imag))
- {
- if (mpfr_get_exp(this->u_.complex_val.imag) > max_exp)
- {
- if (issue_error)
- error_at(location, "complex imaginary part overflow");
- return false;
- }
- }
mpfr_init_set(real, this->u_.complex_val.real, GMP_RNDN);
+ mpfr_init_set(imag, this->u_.complex_val.imag, GMP_RNDN);
break;
default:
go_unreachable();
}
- bool ret;
- if (mpfr_nan_p(real) || mpfr_inf_p(real) || mpfr_zero_p(real))
- ret = true;
- else
- ret = mpfr_get_exp(real) <= max_exp;
+ bool ret = true;
+ if (!mpfr_nan_p(real)
+ && !mpfr_inf_p(real)
+ && !mpfr_zero_p(real)
+ && mpfr_get_exp(real) > max_exp)
+ {
+ if (issue_error)
+ error_at(location, "complex real part overflow");
+ ret = false;
+ }
- mpfr_clear(real);
+ if (!mpfr_nan_p(imag)
+ && !mpfr_inf_p(imag)
+ && !mpfr_zero_p(imag)
+ && mpfr_get_exp(imag) > max_exp)
+ {
+ if (issue_error)
+ error_at(location, "complex imaginary part overflow");
+ ret = false;
+ }
- if (!ret && issue_error)
- error_at(location, "complex real part overflow");
+ if (ret)
+ {
+ // Round the constant to the desired type.
+ mpfr_t t;
+ mpfr_init(t);
+ switch (type->bits())
+ {
+ case 64:
+ mpfr_set_prec(t, 24);
+ break;
+ case 128:
+ mpfr_set_prec(t, 53);
+ break;
+ default:
+ go_unreachable();
+ }
+ mpfr_set(t, real, GMP_RNDN);
+ mpfr_set(real, t, GMP_RNDN);
+ mpfr_set(t, imag, GMP_RNDN);
+ mpfr_set(imag, t, GMP_RNDN);
+ mpfr_clear(t);
+
+ this->set_complex(type, real, imag);
+ }
+
+ mpfr_clear(real);
+ mpfr_clear(imag);
return ret;
}
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index eea141fe776..1b74b801748 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -360,10 +360,11 @@ class Expression
// This is called if the value of this expression is being
// discarded. This issues warnings about computed values being
- // unused.
- void
+ // unused. This returns true if all is well, false if it issued an
+ // error message.
+ bool
discarding_value()
- { this->do_discarding_value(); }
+ { return this->do_discarding_value(); }
// Return whether this is an error expression.
bool
@@ -689,7 +690,7 @@ class Expression
{ return false; }
// Called by the parser if the value is being discarded.
- virtual void
+ virtual bool
do_discarding_value();
// Child class holds type.
@@ -1205,7 +1206,7 @@ class Binary_expression : public Expression
bool
do_numeric_constant_value(Numeric_constant*) const;
- void
+ bool
do_discarding_value();
Type*
@@ -1373,9 +1374,9 @@ class Call_expression : public Expression
virtual Expression*
do_lower(Gogo*, Named_object*, Statement_inserter*, int);
- void
+ bool
do_discarding_value()
- { }
+ { return true; }
virtual Type*
do_type();
@@ -2051,9 +2052,9 @@ class Receive_expression : public Expression
do_traverse(Traverse* traverse)
{ return Expression::traverse(&this->channel_, traverse); }
- void
+ bool
do_discarding_value()
- { }
+ { return true; }
Type*
do_type();
@@ -2219,10 +2220,10 @@ class Numeric_constant
check_int_type(Integer_type*, bool, Location) const;
bool
- check_float_type(Float_type*, bool, Location) const;
+ check_float_type(Float_type*, bool, Location);
bool
- check_complex_type(Complex_type*, bool, Location) const;
+ check_complex_type(Complex_type*, bool, Location);
// The kinds of constants.
enum Classification
diff --git a/gcc/go/gofrontend/go.cc b/gcc/go/gofrontend/go.cc
index 1f2ce8adcde..11692af8095 100644
--- a/gcc/go/gofrontend/go.cc
+++ b/gcc/go/gofrontend/go.cc
@@ -21,7 +21,7 @@ static Gogo* gogo;
GO_EXTERN_C
void
go_create_gogo(int int_type_size, int pointer_size, const char *pkgpath,
- const char *prefix)
+ const char *prefix, const char *relative_import_path)
{
go_assert(::gogo == NULL);
Linemap* linemap = go_get_linemap();
@@ -32,6 +32,9 @@ go_create_gogo(int int_type_size, int pointer_size, const char *pkgpath,
else if (prefix != NULL)
::gogo->set_prefix(prefix);
+ if (relative_import_path != NULL)
+ ::gogo->set_relative_import_path(relative_import_path);
+
// FIXME: This should be in the gcc dependent code.
::gogo->define_builtin_function_trees();
}
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index fa61808ec3c..c0aa496acc3 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -44,6 +44,7 @@ Gogo::Gogo(Backend* backend, Linemap* linemap, int int_type_size,
pkgpath_set_(false),
pkgpath_from_option_(false),
prefix_from_option_(false),
+ relative_import_path_(),
verify_types_(),
interface_types_(),
specific_type_functions_(),
@@ -477,7 +478,8 @@ Gogo::import_package(const std::string& filename,
return;
}
- Import::Stream* stream = Import::open_package(filename, location);
+ Import::Stream* stream = Import::open_package(filename, location,
+ this->relative_import_path_);
if (stream == NULL)
{
error_at(location, "import file %qs not found", filename.c_str());
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h
index 36709f5b45b..cc707ad2dde 100644
--- a/gcc/go/gofrontend/gogo.h
+++ b/gcc/go/gofrontend/gogo.h
@@ -206,6 +206,17 @@ class Gogo
pkgpath_from_option() const
{ return this->pkgpath_from_option_; }
+ // Return the relative import path as set from the command line.
+ // Returns an empty string if it was not set.
+ const std::string&
+ relative_import_path() const
+ { return this->relative_import_path_; }
+
+ // Set the relative import path from a command line option.
+ void
+ set_relative_import_path(const std::string& s)
+ {this->relative_import_path_ = s; }
+
// Return the priority to use for the package we are compiling.
// This is two more than the largest priority of any package we
// import.
@@ -732,6 +743,9 @@ class Gogo
bool pkgpath_from_option_;
// Whether an explicit prefix was set by -fgo-prefix.
bool prefix_from_option_;
+ // The relative import path, from the -fgo-relative-import-path
+ // option.
+ std::string relative_import_path_;
// A list of types to verify.
std::vector<Type*> verify_types_;
// A list of interface types defined while parsing.
diff --git a/gcc/go/gofrontend/import.cc b/gcc/go/gofrontend/import.cc
index 9febf231897..4913100b5fd 100644
--- a/gcc/go/gofrontend/import.cc
+++ b/gcc/go/gofrontend/import.cc
@@ -41,6 +41,9 @@ go_add_search_path(const char* path)
// When FILENAME is not an absolute path and does not start with ./ or
// ../, we use the search path provided by -I and -L options.
+// When FILENAME does start with ./ or ../, we use
+// RELATIVE_IMPORT_PATH as a prefix.
+
// When FILENAME does not exist, we try modifying FILENAME to find the
// file. We use the first of these which exists:
// * We append ".gox".
@@ -55,19 +58,35 @@ go_add_search_path(const char* path)
// later in the search path.
Import::Stream*
-Import::open_package(const std::string& filename, Location location)
+Import::open_package(const std::string& filename, Location location,
+ const std::string& relative_import_path)
{
bool is_local;
if (IS_ABSOLUTE_PATH(filename))
is_local = true;
- else if (filename[0] == '.' && IS_DIR_SEPARATOR(filename[1]))
+ else if (filename[0] == '.'
+ && (filename[1] == '\0' || IS_DIR_SEPARATOR(filename[1])))
is_local = true;
else if (filename[0] == '.'
&& filename[1] == '.'
- && IS_DIR_SEPARATOR(filename[2]))
+ && (filename[2] == '\0' || IS_DIR_SEPARATOR(filename[2])))
is_local = true;
else
is_local = false;
+
+ std::string fn = filename;
+ if (is_local && !IS_ABSOLUTE_PATH(filename) && !relative_import_path.empty())
+ {
+ if (fn == ".")
+ {
+ // A special case.
+ fn = relative_import_path;
+ }
+ else
+ fn = relative_import_path + '/' + fn;
+ is_local = false;
+ }
+
if (!is_local)
{
for (std::vector<std::string>::const_iterator p = search_path.begin();
@@ -77,14 +96,14 @@ Import::open_package(const std::string& filename, Location location)
std::string indir = *p;
if (!indir.empty() && indir[indir.size() - 1] != '/')
indir += '/';
- indir += filename;
+ indir += fn;
Stream* s = Import::try_package_in_directory(indir, location);
if (s != NULL)
return s;
}
}
- Stream* s = Import::try_package_in_directory(filename, location);
+ Stream* s = Import::try_package_in_directory(fn, location);
if (s != NULL)
return s;
diff --git a/gcc/go/gofrontend/import.h b/gcc/go/gofrontend/import.h
index 67bdcb02d57..c6844cda8a5 100644
--- a/gcc/go/gofrontend/import.h
+++ b/gcc/go/gofrontend/import.h
@@ -124,8 +124,10 @@ class Import
// Find import data. This searches the file system for FILENAME and
// returns a pointer to a Stream object to read the data that it
// exports. LOCATION is the location of the import statement.
+ // RELATIVE_IMPORT_PATH is used as a prefix for a relative import.
static Stream*
- open_package(const std::string& filename, Location location);
+ open_package(const std::string& filename, Location location,
+ const std::string& relative_import_path);
// Constructor.
Import(Stream*, Location);
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index ab2bb7cf29d..c65325d016e 100644
--- a/gcc/go/gofrontend/parse.cc
+++ b/gcc/go/gofrontend/parse.cc
@@ -2955,6 +2955,8 @@ Parse::primary_expr(bool may_be_sink, bool may_be_composite_lit,
this->advance_token();
Expression* expr = this->expression(PRECEDENCE_NORMAL, false, true,
NULL);
+ if (this->peek_token()->is_op(OPERATOR_COMMA))
+ this->advance_token();
if (this->peek_token()->is_op(OPERATOR_ELLIPSIS))
{
error_at(this->location(),
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc
index af34670aee0..58057f84a56 100644
--- a/gcc/go/gofrontend/statements.cc
+++ b/gcc/go/gofrontend/statements.cc
@@ -2006,6 +2006,8 @@ Thunk_statement::do_determine_types()
void
Thunk_statement::do_check_types(Gogo*)
{
+ if (!this->call_->discarding_value())
+ return;
Call_expression* ce = this->call_->call_expression();
if (ce == NULL)
{
@@ -2471,11 +2473,15 @@ Thunk_statement::build_thunk(Gogo* gogo, const std::string& thunk_name)
Expression_statement* es =
static_cast<Expression_statement*>(call_statement);
Call_expression* ce = es->expr()->call_expression();
- go_assert(ce != NULL);
- if (may_call_recover)
- ce->set_is_deferred();
- if (recover_arg != NULL)
- ce->set_recover_arg(recover_arg);
+ if (ce == NULL)
+ go_assert(saw_errors());
+ else
+ {
+ if (may_call_recover)
+ ce->set_is_deferred();
+ if (recover_arg != NULL)
+ ce->set_recover_arg(recover_arg);
+ }
}
// That is all the thunk has to do.
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 90856a0c05d..795a1b51026 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -54,8 +54,7 @@ get_backend_interface_fields(Gogo* gogo, Interface_type* type,
// Class Type.
Type::Type(Type_classification classification)
- : classification_(classification), btype_is_placeholder_(false),
- btype_(NULL), type_descriptor_var_(NULL)
+ : classification_(classification), btype_(NULL), type_descriptor_var_(NULL)
{
}
@@ -919,11 +918,7 @@ Btype*
Type::get_backend(Gogo* gogo)
{
if (this->btype_ != NULL)
- {
- if (this->btype_is_placeholder_ && gogo->named_types_are_converted())
- this->finish_backend(gogo);
- return this->btype_;
- }
+ return this->btype_;
if (this->forward_declaration_type() != NULL
|| this->named_type() != NULL)
@@ -937,20 +932,36 @@ Type::get_backend(Gogo* gogo)
// that. There is no need to use the hash table for named types, as
// named types are only identical to themselves.
- std::pair<Type*, Btype*> val(this, NULL);
+ std::pair<Type*, Type_btype_entry> val;
+ val.first = this;
+ val.second.btype = NULL;
+ val.second.is_placeholder = false;
std::pair<Type_btypes::iterator, bool> ins =
Type::type_btypes.insert(val);
- if (!ins.second && ins.first->second != NULL)
+ if (!ins.second && ins.first->second.btype != NULL)
{
- if (gogo != NULL && gogo->named_types_are_converted())
- this->btype_ = ins.first->second;
- return ins.first->second;
+ // Note that GOGO can be NULL here, but only when the GCC
+ // middle-end is asking for a frontend type. That will only
+ // happen for simple types, which should never require
+ // placeholders.
+ if (!ins.first->second.is_placeholder)
+ this->btype_ = ins.first->second.btype;
+ else if (gogo->named_types_are_converted())
+ {
+ this->finish_backend(gogo, ins.first->second.btype);
+ ins.first->second.is_placeholder = false;
+ }
+
+ return ins.first->second.btype;
}
Btype* bt = this->get_btype_without_hash(gogo);
- if (ins.first->second == NULL)
- ins.first->second = bt;
+ if (ins.first->second.btype == NULL)
+ {
+ ins.first->second.btype = bt;
+ ins.first->second.is_placeholder = false;
+ }
else
{
// We have already created a backend representation for this
@@ -958,10 +969,9 @@ Type::get_backend(Gogo* gogo)
// a named type which in turns uses an identical unnamed type.
// Use the tree we created earlier and ignore the one we just
// built.
- bt = ins.first->second;
- if (gogo == NULL || !gogo->named_types_are_converted())
- return bt;
- this->btype_ = bt;
+ if (this->btype_ == bt)
+ this->btype_ = ins.first->second.btype;
+ bt = ins.first->second.btype;
}
return bt;
@@ -1028,6 +1038,37 @@ Type::get_backend_placeholder(Gogo* gogo)
// These are simple types that can just be created directly.
return this->get_backend(gogo);
+ case TYPE_MAP:
+ case TYPE_CHANNEL:
+ // All maps and channels have the same backend representation.
+ return this->get_backend(gogo);
+
+ case TYPE_NAMED:
+ case TYPE_FORWARD:
+ // Named types keep track of their own dependencies and manage
+ // their own placeholders.
+ return this->get_backend(gogo);
+
+ case TYPE_INTERFACE:
+ if (this->interface_type()->is_empty())
+ return Interface_type::get_backend_empty_interface_type(gogo);
+ break;
+
+ default:
+ break;
+ }
+
+ std::pair<Type*, Type_btype_entry> val;
+ val.first = this;
+ val.second.btype = NULL;
+ val.second.is_placeholder = false;
+ std::pair<Type_btypes::iterator, bool> ins =
+ Type::type_btypes.insert(val);
+ if (!ins.second && ins.first->second.btype != NULL)
+ return ins.first->second.btype;
+
+ switch (this->classification_)
+ {
case TYPE_FUNCTION:
{
Location loc = this->function_type()->location();
@@ -1070,37 +1111,36 @@ Type::get_backend_placeholder(Gogo* gogo)
}
break;
- case TYPE_MAP:
- case TYPE_CHANNEL:
- // All maps and channels have the same backend representation.
- return this->get_backend(gogo);
-
case TYPE_INTERFACE:
- if (this->interface_type()->is_empty())
- return Interface_type::get_backend_empty_interface_type(gogo);
- else
- {
- std::vector<Backend::Btyped_identifier> bfields;
- get_backend_interface_fields(gogo, this->interface_type(), true,
- &bfields);
- bt = gogo->backend()->struct_type(bfields);
- }
+ {
+ go_assert(!this->interface_type()->is_empty());
+ std::vector<Backend::Btyped_identifier> bfields;
+ get_backend_interface_fields(gogo, this->interface_type(), true,
+ &bfields);
+ bt = gogo->backend()->struct_type(bfields);
+ }
break;
- case TYPE_NAMED:
- case TYPE_FORWARD:
- // Named types keep track of their own dependencies and manage
- // their own placeholders.
- return this->get_backend(gogo);
-
case TYPE_SINK:
case TYPE_CALL_MULTIPLE_RESULT:
+ /* Note that various classifications were handled in the earlier
+ switch. */
default:
go_unreachable();
}
- this->btype_ = bt;
- this->btype_is_placeholder_ = true;
+ if (ins.first->second.btype == NULL)
+ {
+ ins.first->second.btype = bt;
+ ins.first->second.is_placeholder = true;
+ }
+ else
+ {
+ // A placeholder for this type got created along the way. Use
+ // that one and ignore the one we just built.
+ bt = ins.first->second.btype;
+ }
+
return bt;
}
@@ -1108,12 +1148,8 @@ Type::get_backend_placeholder(Gogo* gogo)
// using a placeholder type.
void
-Type::finish_backend(Gogo* gogo)
+Type::finish_backend(Gogo* gogo, Btype *placeholder)
{
- go_assert(this->btype_ != NULL);
- if (!this->btype_is_placeholder_)
- return;
-
switch (this->classification_)
{
case TYPE_ERROR:
@@ -1129,7 +1165,7 @@ Type::finish_backend(Gogo* gogo)
case TYPE_FUNCTION:
{
Btype* bt = this->do_get_backend(gogo);
- if (!gogo->backend()->set_placeholder_function_type(this->btype_, bt))
+ if (!gogo->backend()->set_placeholder_function_type(placeholder, bt))
go_assert(saw_errors());
}
break;
@@ -1137,7 +1173,7 @@ Type::finish_backend(Gogo* gogo)
case TYPE_POINTER:
{
Btype* bt = this->do_get_backend(gogo);
- if (!gogo->backend()->set_placeholder_pointer_type(this->btype_, bt))
+ if (!gogo->backend()->set_placeholder_pointer_type(placeholder, bt))
go_assert(saw_errors());
}
break;
@@ -1174,7 +1210,7 @@ Type::finish_backend(Gogo* gogo)
go_unreachable();
}
- this->btype_is_placeholder_ = false;
+ this->btype_ = placeholder;
}
// Return a pointer to the type descriptor for this type.
@@ -2391,7 +2427,7 @@ class Error_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -2429,7 +2465,7 @@ class Void_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -2467,7 +2503,7 @@ class Boolean_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return true; }
Btype*
@@ -2966,8 +3002,8 @@ String_type::do_get_backend(Gogo* gogo)
// backend representation, so force it to be finished now.
if (!gogo->named_types_are_converted())
{
- pb->get_backend_placeholder(gogo);
- pb->finish_backend(gogo);
+ Btype* bt = pb->get_backend_placeholder(gogo);
+ pb->finish_backend(gogo, bt);
}
fields[0].name = "__data";
@@ -3090,7 +3126,7 @@ class Sink_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -3968,7 +4004,7 @@ class Nil_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -4019,7 +4055,7 @@ class Call_multiple_result_type : public Type
}
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -4296,7 +4332,7 @@ Struct_type::struct_has_hidden_fields(const Named_type* within,
// comparisons.
bool
-Struct_type::do_compare_is_identity(Gogo* gogo) const
+Struct_type::do_compare_is_identity(Gogo* gogo)
{
const Struct_field_list* fields = this->fields_;
if (fields == NULL)
@@ -4328,6 +4364,16 @@ Struct_type::do_compare_is_identity(Gogo* gogo) const
return false;
offset += field_size;
}
+
+ unsigned int struct_size;
+ if (!this->backend_type_size(gogo, &struct_size))
+ return false;
+ if (offset != struct_size)
+ {
+ // Trailing padding may not be zero when on the stack.
+ return false;
+ }
+
return true;
}
@@ -5272,7 +5318,7 @@ Array_type::do_verify()
// Whether we can use memcmp to compare this array.
bool
-Array_type::do_compare_is_identity(Gogo* gogo) const
+Array_type::do_compare_is_identity(Gogo* gogo)
{
if (this->length_ == NULL)
return false;
@@ -7967,7 +8013,7 @@ Named_type::do_has_pointer() const
// function.
bool
-Named_type::do_compare_is_identity(Gogo* gogo) const
+Named_type::do_compare_is_identity(Gogo* gogo)
{
// We don't use this->seen_ here because compare_is_identity may
// call base() later, and that will mess up if seen_ is set here.
diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h
index cced68ddd68..bdda7a4280e 100644
--- a/gcc/go/gofrontend/types.h
+++ b/gcc/go/gofrontend/types.h
@@ -576,7 +576,7 @@ class Type
// identity function which gets nothing but a pointer to the value
// and a size.
bool
- compare_is_identity(Gogo* gogo) const
+ compare_is_identity(Gogo* gogo)
{ return this->do_compare_is_identity(gogo); }
// Return a hash code for this type for the method hash table.
@@ -869,7 +869,7 @@ class Type
// Finish the backend representation of a placeholder.
void
- finish_backend(Gogo*);
+ finish_backend(Gogo*, Btype*);
// Build a type descriptor entry for this type. Return a pointer to
// it. The location is the location which causes us to need the
@@ -950,7 +950,7 @@ class Type
{ return false; }
virtual bool
- do_compare_is_identity(Gogo*) const = 0;
+ do_compare_is_identity(Gogo*) = 0;
virtual unsigned int
do_hash_for_method(Gogo*) const;
@@ -1191,10 +1191,18 @@ class Type
Btype*
get_btype_without_hash(Gogo*);
+ // A backend type that may be a placeholder.
+ struct Type_btype_entry
+ {
+ Btype *btype;
+ bool is_placeholder;
+ };
+
// A mapping from Type to Btype*, used to ensure that the backend
- // representation of identical types is identical.
- typedef Unordered_map_hash(const Type*, Btype*, Type_hash_identical,
- Type_identical) Type_btypes;
+ // representation of identical types is identical. This is only
+ // used for unnamed types.
+ typedef Unordered_map_hash(const Type*, Type_btype_entry,
+ Type_hash_identical, Type_identical) Type_btypes;
static Type_btypes type_btypes;
@@ -1211,9 +1219,6 @@ class Type
// The type classification.
Type_classification classification_;
- // Whether btype_ is a placeholder type used while named types are
- // being converted.
- bool btype_is_placeholder_;
// The backend representation of the type, once it has been
// determined.
Btype* btype_;
@@ -1458,7 +1463,7 @@ class Integer_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return true; }
unsigned int
@@ -1535,7 +1540,7 @@ class Float_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
unsigned int
@@ -1604,7 +1609,7 @@ class Complex_type : public Type
protected:
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
unsigned int
@@ -1664,7 +1669,7 @@ class String_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
Btype*
@@ -1778,7 +1783,7 @@ class Function_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
unsigned int
@@ -1853,7 +1858,7 @@ class Pointer_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return true; }
unsigned int
@@ -2139,7 +2144,7 @@ class Struct_type : public Type
do_has_pointer() const;
bool
- do_compare_is_identity(Gogo*) const;
+ do_compare_is_identity(Gogo*);
unsigned int
do_hash_for_method(Gogo*) const;
@@ -2272,7 +2277,7 @@ class Array_type : public Type
}
bool
- do_compare_is_identity(Gogo*) const;
+ do_compare_is_identity(Gogo*);
unsigned int
do_hash_for_method(Gogo*) const;
@@ -2365,7 +2370,7 @@ class Map_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
unsigned int
@@ -2451,7 +2456,7 @@ class Channel_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return true; }
unsigned int
@@ -2582,7 +2587,7 @@ class Interface_type : public Type
{ return true; }
bool
- do_compare_is_identity(Gogo*) const
+ do_compare_is_identity(Gogo*)
{ return false; }
unsigned int
@@ -2865,7 +2870,7 @@ class Named_type : public Type
do_has_pointer() const;
bool
- do_compare_is_identity(Gogo*) const;
+ do_compare_is_identity(Gogo*);
unsigned int
do_hash_for_method(Gogo*) const;
@@ -2949,7 +2954,7 @@ class Named_type : public Type
// function exits.
mutable bool seen_;
// Like seen_, but used only by do_compare_is_identity.
- mutable bool seen_in_compare_is_identity_;
+ bool seen_in_compare_is_identity_;
// Like seen_, but used only by do_get_backend.
bool seen_in_get_backend_;
};
@@ -3004,7 +3009,7 @@ class Forward_declaration_type : public Type
{ return this->real_type()->has_pointer(); }
bool
- do_compare_is_identity(Gogo* gogo) const
+ do_compare_is_identity(Gogo* gogo)
{ return this->real_type()->compare_is_identity(gogo); }
unsigned int
diff --git a/gcc/go/lang.opt b/gcc/go/lang.opt
index eb9ed9a63a0..22197a71e3d 100644
--- a/gcc/go/lang.opt
+++ b/gcc/go/lang.opt
@@ -61,6 +61,10 @@ fgo-prefix=
Go Joined RejectNegative
-fgo-prefix=<string> Set package-specific prefix for exported Go names
+fgo-relative-import-path=
+Go Joined RejectNegative
+-fgo-relative-import-path=<path> Treat a relative import as relative to path
+
frequire-return-statement
Go Var(go_require_return_statement) Init(1) Warning
Functions which return values must end with return statements
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 8007359a972..8a1b3b54729 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -44,6 +44,7 @@
#include "tree-pass.h"
#include "df.h"
#include "vec.h"
+#include "pointer-set.h"
#include "vecprim.h"
#include "dbgcnt.h"
@@ -2689,12 +2690,14 @@ noce_process_if_block (struct noce_if_info *if_info)
/* Check whether a block is suitable for conditional move conversion.
Every insn must be a simple set of a register to a constant or a
- register. For each assignment, store the value in the array VALS,
- indexed by register number, then store the register number in
- REGS. COND is the condition we will test. */
+ register. For each assignment, store the value in the pointer map
+ VALS, keyed indexed by register pointer, then store the register
+ pointer in REGS. COND is the condition we will test. */
static int
-check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
+check_cond_move_block (basic_block bb,
+ struct pointer_map_t *vals,
+ VEC (rtx, heap) **regs,
rtx cond)
{
rtx insn;
@@ -2708,6 +2711,7 @@ check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
FOR_BB_INSNS (bb, insn)
{
rtx set, dest, src;
+ void **slot;
if (!NONDEBUG_INSN_P (insn) || JUMP_P (insn))
continue;
@@ -2734,14 +2738,14 @@ check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
/* Don't try to handle this if the source register was
modified earlier in the block. */
if ((REG_P (src)
- && vals[REGNO (src)] != NULL)
+ && pointer_map_contains (vals, src))
|| (GET_CODE (src) == SUBREG && REG_P (SUBREG_REG (src))
- && vals[REGNO (SUBREG_REG (src))] != NULL))
+ && pointer_map_contains (vals, SUBREG_REG (src))))
return FALSE;
/* Don't try to handle this if the destination register was
modified earlier in the block. */
- if (vals[REGNO (dest)] != NULL)
+ if (pointer_map_contains (vals, dest))
return FALSE;
/* Don't try to handle this if the condition uses the
@@ -2755,17 +2759,18 @@ check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
&& modified_between_p (src, insn, NEXT_INSN (BB_END (bb))))
return FALSE;
- vals[REGNO (dest)] = src;
+ slot = pointer_map_insert (vals, (void *) dest);
+ *slot = (void *) src;
- VEC_safe_push (int, heap, *regs, REGNO (dest));
+ VEC_safe_push (rtx, heap, *regs, dest);
}
return TRUE;
}
/* Given a basic block BB suitable for conditional move conversion,
- a condition COND, and arrays THEN_VALS and ELSE_VALS containing the
- register values depending on COND, emit the insns in the block as
+ a condition COND, and pointer maps THEN_VALS and ELSE_VALS containing
+ the register values depending on COND, emit the insns in the block as
conditional moves. If ELSE_BLOCK is true, THEN_BB was already
processed. The caller has started a sequence for the conversion.
Return true if successful, false if something goes wrong. */
@@ -2773,7 +2778,8 @@ check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
static bool
cond_move_convert_if_block (struct noce_if_info *if_infop,
basic_block bb, rtx cond,
- rtx *then_vals, rtx *else_vals,
+ struct pointer_map_t *then_vals,
+ struct pointer_map_t *else_vals,
bool else_block_p)
{
enum rtx_code code;
@@ -2786,7 +2792,7 @@ cond_move_convert_if_block (struct noce_if_info *if_infop,
FOR_BB_INSNS (bb, insn)
{
rtx set, target, dest, t, e;
- unsigned int regno;
+ void **then_slot, **else_slot;
/* ??? Maybe emit conditional debug insn? */
if (!NONDEBUG_INSN_P (insn) || JUMP_P (insn))
@@ -2795,10 +2801,11 @@ cond_move_convert_if_block (struct noce_if_info *if_infop,
gcc_assert (set && REG_P (SET_DEST (set)));
dest = SET_DEST (set);
- regno = REGNO (dest);
- t = then_vals[regno];
- e = else_vals[regno];
+ then_slot = pointer_map_contains (then_vals, dest);
+ else_slot = pointer_map_contains (else_vals, dest);
+ t = then_slot ? (rtx) *then_slot : NULL_RTX;
+ e = else_slot ? (rtx) *else_slot : NULL_RTX;
if (else_block_p)
{
@@ -2842,31 +2849,25 @@ cond_move_process_if_block (struct noce_if_info *if_info)
rtx jump = if_info->jump;
rtx cond = if_info->cond;
rtx seq, loc_insn;
- int max_reg, size, c, reg;
- rtx *then_vals;
- rtx *else_vals;
- VEC (int, heap) *then_regs = NULL;
- VEC (int, heap) *else_regs = NULL;
+ rtx reg;
+ int c;
+ struct pointer_map_t *then_vals;
+ struct pointer_map_t *else_vals;
+ VEC (rtx, heap) *then_regs = NULL;
+ VEC (rtx, heap) *else_regs = NULL;
unsigned int i;
+ int success_p = FALSE;
/* Build a mapping for each block to the value used for each
register. */
- max_reg = max_reg_num ();
- size = (max_reg + 1) * sizeof (rtx);
- then_vals = (rtx *) alloca (size);
- else_vals = (rtx *) alloca (size);
- memset (then_vals, 0, size);
- memset (else_vals, 0, size);
+ then_vals = pointer_map_create ();
+ else_vals = pointer_map_create ();
/* Make sure the blocks are suitable. */
if (!check_cond_move_block (then_bb, then_vals, &then_regs, cond)
|| (else_bb
&& !check_cond_move_block (else_bb, else_vals, &else_regs, cond)))
- {
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return FALSE;
- }
+ goto done;
/* Make sure the blocks can be used together. If the same register
is set in both blocks, and is not set to a constant in both
@@ -2875,41 +2876,38 @@ cond_move_process_if_block (struct noce_if_info *if_info)
source register does not change after the assignment. Also count
the number of registers set in only one of the blocks. */
c = 0;
- FOR_EACH_VEC_ELT (int, then_regs, i, reg)
+ FOR_EACH_VEC_ELT (rtx, then_regs, i, reg)
{
- if (!then_vals[reg] && !else_vals[reg])
- continue;
+ void **then_slot = pointer_map_contains (then_vals, reg);
+ void **else_slot = pointer_map_contains (else_vals, reg);
- if (!else_vals[reg])
+ gcc_checking_assert (then_slot);
+ if (!else_slot)
++c;
else
{
- if (!CONSTANT_P (then_vals[reg])
- && !CONSTANT_P (else_vals[reg])
- && !rtx_equal_p (then_vals[reg], else_vals[reg]))
- {
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return FALSE;
- }
+ rtx then_val = (rtx) *then_slot;
+ rtx else_val = (rtx) *else_slot;
+ if (!CONSTANT_P (then_val) && !CONSTANT_P (else_val)
+ && !rtx_equal_p (then_val, else_val))
+ goto done;
}
}
/* Finish off c for MAX_CONDITIONAL_EXECUTE. */
- FOR_EACH_VEC_ELT (int, else_regs, i, reg)
- if (!then_vals[reg])
- ++c;
+ FOR_EACH_VEC_ELT (rtx, else_regs, i, reg)
+ {
+ gcc_checking_assert (pointer_map_contains (else_vals, reg));
+ if (!pointer_map_contains (then_vals, reg))
+ ++c;
+ }
/* Make sure it is reasonable to convert this block. What matters
is the number of assignments currently made in only one of the
branches, since if we convert we are going to always execute
them. */
if (c > MAX_CONDITIONAL_EXECUTE)
- {
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return FALSE;
- }
+ goto done;
/* Try to emit the conditional moves. First do the then block,
then do anything left in the else blocks. */
@@ -2921,17 +2919,11 @@ cond_move_process_if_block (struct noce_if_info *if_info)
then_vals, else_vals, true)))
{
end_sequence ();
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return FALSE;
+ goto done;
}
seq = end_ifcvt_sequence (if_info);
if (!seq)
- {
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return FALSE;
- }
+ goto done;
loc_insn = first_active_insn (then_bb);
if (!loc_insn)
@@ -2962,9 +2954,14 @@ cond_move_process_if_block (struct noce_if_info *if_info)
num_updated_if_blocks++;
- VEC_free (int, heap, then_regs);
- VEC_free (int, heap, else_regs);
- return TRUE;
+ success_p = TRUE;
+
+done:
+ pointer_map_destroy (then_vals);
+ pointer_map_destroy (else_vals);
+ VEC_free (rtx, heap, then_regs);
+ VEC_free (rtx, heap, else_regs);
+ return success_p;
}
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c
index 668a5ce9163..8c504c28639 100644
--- a/gcc/lto-opts.c
+++ b/gcc/lto-opts.c
@@ -93,6 +93,20 @@ lto_write_options (void)
{
struct cl_decoded_option *option = &save_decoded_options[i];
+ /* Skip explicitly some common options that we do not need. */
+ switch (option->opt_index)
+ {
+ case OPT_dumpbase:
+ case OPT_SPECIAL_unknown:
+ case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_program_name:
+ case OPT_SPECIAL_input_file:
+ continue;
+
+ default:
+ break;
+ }
+
/* Skip frontend and driver specific options here. */
if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO)))
continue;
@@ -108,17 +122,6 @@ lto_write_options (void)
if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING))
continue;
- /* Skip explicitly some common options that we do not need. */
- switch (option->opt_index)
- {
- case OPT_dumpbase:
- case OPT_SPECIAL_input_file:
- continue;
-
- default:
- break;
- }
-
for (j = 0; j < option->canonical_option_num_elements; ++j)
append_to_collect_gcc_options (&temporary_obstack, &first_p,
option->canonical_option[j]);
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 1c9aa833dbc..fcc9b724641 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -393,6 +393,12 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
struct cl_decoded_option *foption = &fdecoded_options[i];
switch (foption->opt_index)
{
+ case OPT_SPECIAL_unknown:
+ case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_program_name:
+ case OPT_SPECIAL_input_file:
+ break;
+
default:
if (!(cl_options[foption->opt_index].flags & CL_TARGET))
break;
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 60e1ccd5357..23c448f8338 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-08 Joseph Myers <joseph@codesourcery.com>
+
+ * es.po: Update.
+
2012-09-26 Joseph Myers <joseph@codesourcery.com>
* sv.po: Update.
diff --git a/gcc/po/es.po b/gcc/po/es.po
index 245d16d71a4..07878db195a 100644
--- a/gcc/po/es.po
+++ b/gcc/po/es.po
@@ -1,4 +1,4 @@
-# Mensajes en español para gcc-4.7.1.
+# Mensajes en español para gcc-4.7.2.
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# This file is distributed under the same license as the gcc package.
# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
@@ -7,10 +7,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 4.7.1\n"
+"Project-Id-Version: gcc 4.7.2\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2012-09-19 14:50+0000\n"
-"PO-Revision-Date: 2012-06-22 13:49-0500\n"
+"PO-Revision-Date: 2012-09-24 13:50-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"Language: es\n"
@@ -7589,10 +7589,8 @@ msgid "Follow Renesas (formerly Hitachi) / SuperH calling conventions"
msgstr "Sigue las convenciones de llamada Renesas (anteriormente Hitachi) / SuperH"
#: config/sh/sh.opt:274
-#, fuzzy
-#| msgid "Increase the IEEE compliance for floating-point code"
msgid "Increase the IEEE compliance for floating-point comparisons"
-msgstr "Incrementa el cumplimiento con IEEE para el código de coma flotante"
+msgstr "Incrementa el cumplimiento con IEEE para las comparaciones de coma flotante"
#: config/sh/sh.opt:278
msgid "Enable the use of the indexed addressing mode for SHmedia32/SHcompact"
@@ -12044,7 +12042,7 @@ msgstr "se esperaba una expresión booleana"
#: go/gofrontend/statements.cc:4198
msgid "cannot type switch on non-interface value"
-msgstr ""
+msgstr "no se puede cambiar el tipo en valores que no son de interfaz"
#: go/gofrontend/statements.cc:4320
msgid "incompatible types in send"
diff --git a/gcc/pointer-set.c b/gcc/pointer-set.c
index d5585c68b79..35f0d19ff0c 100644
--- a/gcc/pointer-set.c
+++ b/gcc/pointer-set.c
@@ -64,7 +64,7 @@ hash1 (const void *p, unsigned long max, unsigned long logmax)
#endif
const unsigned long shift = HOST_BITS_PER_LONG - logmax;
- return ((A * (unsigned long) p) >> shift) & (max - 1);
+ return ((A * (uintptr_t) p) >> shift) & (max - 1);
}
/* Allocate an empty pointer set. */
diff --git a/gcc/prefix.c b/gcc/prefix.c
index 369ede70309..c7003f8c674 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -157,12 +157,12 @@ lookup_key (char *key)
}
size = 32;
- dst = xmalloc (size);
+ dst = XNEWVEC (char, size);
res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
if (res == ERROR_MORE_DATA && type == REG_SZ)
{
- dst = xrealloc (dst, size);
+ dst = XRESIZEVEC (char, dst, size);
res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
}
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index e74fee248b5..74089df38d7 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -3224,7 +3224,11 @@ has_dependence_note_reg_use (int regno)
if (reg_last->clobbers)
*dsp = (*dsp & ~SPECULATIVE) | DEP_ANTI;
- /* Handle BE_IN_SPEC. */
+ /* Merge BE_IN_SPEC bits into *DSP when the dependency producer
+ is actually a check insn. We need to do this for any register
+ read-read dependency with the check unless we track properly
+ all registers written by BE_IN_SPEC-speculated insns, as
+ we don't have explicit dependence lists. See PR 53975. */
if (reg_last->uses)
{
ds_t pro_spec_checked_ds;
@@ -3232,9 +3236,7 @@ has_dependence_note_reg_use (int regno)
pro_spec_checked_ds = INSN_SPEC_CHECKED_DS (has_dependence_data.pro);
pro_spec_checked_ds = ds_get_max_dep_weak (pro_spec_checked_ds);
- if (pro_spec_checked_ds != 0
- && bitmap_bit_p (INSN_REG_SETS (has_dependence_data.pro), regno))
- /* Merge BE_IN_SPEC bits into *DSP. */
+ if (pro_spec_checked_ds != 0)
*dsp = ds_full_merge (*dsp, pro_spec_checked_ds,
NULL_RTX, NULL_RTX);
}
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 2af01aea99e..abbfa84ff3a 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -3567,29 +3567,41 @@ process_use_exprs (av_set_t *av_ptr)
return NULL;
}
-/* Lookup EXPR in VINSN_VEC and return TRUE if found. */
+/* Lookup EXPR in VINSN_VEC and return TRUE if found. Also check patterns from
+ EXPR's history of changes. */
static bool
vinsn_vec_has_expr_p (vinsn_vec_t vinsn_vec, expr_t expr)
{
- vinsn_t vinsn;
+ vinsn_t vinsn, expr_vinsn;
int n;
+ unsigned i;
- FOR_EACH_VEC_ELT (vinsn_t, vinsn_vec, n, vinsn)
- if (VINSN_SEPARABLE_P (vinsn))
- {
- if (vinsn_equal_p (vinsn, EXPR_VINSN (expr)))
- return true;
- }
- else
- {
- /* For non-separable instructions, the blocking insn can have
- another pattern due to substitution, and we can't choose
- different register as in the above case. Check all registers
- being written instead. */
- if (bitmap_intersect_p (VINSN_REG_SETS (vinsn),
- VINSN_REG_SETS (EXPR_VINSN (expr))))
- return true;
- }
+ /* Start with checking expr itself and then proceed with all the old forms
+ of expr taken from its history vector. */
+ for (i = 0, expr_vinsn = EXPR_VINSN (expr);
+ expr_vinsn;
+ expr_vinsn = (i < VEC_length (expr_history_def,
+ EXPR_HISTORY_OF_CHANGES (expr))
+ ? VEC_index (expr_history_def,
+ EXPR_HISTORY_OF_CHANGES (expr),
+ i++)->old_expr_vinsn
+ : NULL))
+ FOR_EACH_VEC_ELT (vinsn_t, vinsn_vec, n, vinsn)
+ if (VINSN_SEPARABLE_P (vinsn))
+ {
+ if (vinsn_equal_p (vinsn, expr_vinsn))
+ return true;
+ }
+ else
+ {
+ /* For non-separable instructions, the blocking insn can have
+ another pattern due to substitution, and we can't choose
+ different register as in the above case. Check all registers
+ being written instead. */
+ if (bitmap_intersect_p (VINSN_REG_SETS (vinsn),
+ VINSN_REG_SETS (expr_vinsn)))
+ return true;
+ }
return false;
}
@@ -5697,8 +5709,8 @@ update_and_record_unavailable_insns (basic_block book_block)
|| EXPR_TARGET_AVAILABLE (new_expr)
!= EXPR_TARGET_AVAILABLE (cur_expr))
/* Unfortunately, the below code could be also fired up on
- separable insns.
- FIXME: add an example of how this could happen. */
+ separable insns, e.g. when moving insns through the new
+ speculation check as in PR 53701. */
vinsn_vec_add (&vec_bookkeeping_blocked_vinsns, cur_expr);
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5cab8fcc738..dea2f50d9af 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,219 @@
+2012-12-07 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-12-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/55597
+ * gcc.target/i386/pr55597.c: New test.
+
+2012-12-03 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-09-24 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53663
+ * gcc.dg/torture/pr53663-1.c: New testcase.
+ * gcc.dg/torture/pr53663-2.c: Likewise.
+ * gcc.dg/torture/pr53663-3.c: Likewise.
+
+2012-12-03 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2012-12-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/55570
+ * gcc.dg/pr55570.c: New test.
+
+2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.dg/torture/pr54920.c: Add "-fno-common" option on hppa*-*-hpux*.
+
+2012-11-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/53862
+ * g++.dg/cpp0x/variadic134.C: New.
+
+ PR c++/53858
+ * g++.dg/cpp0x/alias-decl-20.C: New.
+
+ PR c++/50852
+ * g++.dg/template/typedef39.C: New.
+
+ PR c++/53039
+ * g++.dg/cpp0x/variadic133.C: New.
+ * g++.dg/template/param1.C: Adjust.
+
+2012-11-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55331
+ * g++.dg/opt/pr55331.C: New testcase.
+
+2012-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54894
+ * gcc.dg/torture/pr54894.c: New testcase.
+
+ 2012-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54735
+ * g++.dg/torture/pr54735.C: New testcase.
+
+2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55446
+ * g++.dg/init/new41.C: New.
+
+2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55314
+ Backport from trunk
+ * gfortran.dg/allocate_error_4.f90: New test.
+
+2012-11-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55352
+ * gfortran.dg/namelist_76.f90: New.
+
+2012-11-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backported from mainline
+ 2012-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/55142
+ * gcc.target/i386/pr55142-1.c: New file.
+ * gcc.target/i386/pr55142-2.c: Likewise.
+
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/stack_check3.ad[sb]: New test.
+
+2012-11-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/compile/20121107-1.c: New test.
+
+2012-11-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54917
+ * gfortran.dg/transfer_class_1.f90: New.
+
+2012-11-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/torture/20121105-1.C: New test.
+
+2012-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2012-10-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54828
+ * g++.dg/debug/pr54828.C: New test.
+
+ 2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54988
+ * c-c++-common/pr54988.c: New test.
+
+ 2012-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54877
+ * gcc.dg/torture/pr54877.c: New test.
+
+2012-11-02 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/pr54985.c: New test.
+
+2012-10-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/53517
+ * gnat.dg/lto14.adb: Skip on Solaris.
+
+2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54984
+ * g++.dg/template/new11.C: New.
+
+2012-10-26 Terry Guo <terry.guo@arm.com>
+
+ Backport from mainline
+ 2012-10-23 Terry Guo <terry.guo@arm.com>
+
+ PR target/55019
+ * gcc.dg/pr55019.c: New.
+
+2012-10-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54902
+ * g++.dg/torture/pr54902.C: New testcase.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/modular4.adb: New test.
+ * gnat.dg/modular4_pkg.ads: New helper.
+
+2012-10-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/atomic1.ads: XFAIL on MIPS.
+ * gnat.dg/specs/addr1.ads: Likewise.
+
+2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ Backport from mainline
+ 2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ PR target/54892
+ * gcc.target/arm/pr54892.c: New.
+
+2012-10-16 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2012-08-09 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/53701
+ * gcc.dg/pr53701.c: New test.
+
+2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx256-unaligned-load-1.c: Update asm scan patterns.
+ * gcc.target/i386/avx256-unaligned-load-2.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-load-3.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-load-4.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-1.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-2.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-3.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-4.c: Ditto.
+
+2012-10-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54920
+ * gcc.dg/torture/pr54920.c: New testcase.
+
+2012-10-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54784
+ * gfortran.dg/class_allocate_13.f90: New.
+
+2012-10-08 Terry Guo <terry.guo@arm.com>
+
+ Backported from mainline
+ 2012-09-19 Terry Guo <terry.guo@arm.com>
+
+ * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
+ extra prune rules that will be applied to all tests in a .exp file.
+ (gcc-dg-prune): Use rules defined by the above variable.
+ * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
+ harmless warnings on architecture switch conflict.
+
+2012-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54858
+ * g++.dg/template/pr54858.C: New test.
+
2012-10-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/33763
diff --git a/gcc/testsuite/ChangeLog.google-4_7 b/gcc/testsuite/ChangeLog.google-4_7
new file mode 100644
index 00000000000..247dfbf3f90
--- /dev/null
+++ b/gcc/testsuite/ChangeLog.google-4_7
@@ -0,0 +1,181 @@
+2012-12-01 Xinliang David Li <davidxl@google.com>
+
+ Backport r194038 from trunk
+
+ * gcc.target/i386/ifcvt-onecmpl-abs-1.c: Check for
+ cltd.
+
+2012-11-26 Diego Novillo <dnovillo@google.com>
+
+ Backport from gcc-4_7-branch r193816.
+
+ 2012-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54894
+ * gcc.dg/torture/pr54894.c: New testcase.
+
+ 2012-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54735
+ * g++.dg/torture/pr54735.C: New testcase.
+
+2012-11-03 Xinliang David Li <davidxl@google.com>
+
+ Backport 190538 from trunk:
+
+ PR c++/10416
+ * g++.dg/warn/Wunused-var-17.C: New.
+
+2012-11-01 Easwaran Raman <eraman@google.com>
+
+ Backport 191302 from trunk:
+
+ 2012-09-14 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.dg/pr44194-1.c: Check that there are no memory accesses left.
+
+2012-10-18 Easwaran Raman <eraman@google.com>
+
+ Backport r183817 from google/gcc-4_6 branch.
+
+ 2012-02-01 Easwaran Raman <eraman@google.com>
+
+ * tree-prof/switch-case-1.c: New test.
+ * tree-prof/switch-case-2.c: New test.
+
+2012-10-10 Dehao Chen <dehao@google.com>
+
+ Backport 192285 from trunk:
+
+ 2012-10-10 Dehao Chen <dehao@google.com>
+
+ * g++.dg/debug/dwarf2/deallocator.C: Cover more deallocator cases.
+
+2012-10-08 Dehao Chen <dehao@google.com>
+
+ Backport 192049 from trunk:
+
+ * gcc.dg/pr54782.c: New test.
+
+2012-09-14 Dehao Chen <dehao@google.com>
+
+ Backport 191338 from trunk:
+
+ 2012-09-14 Dehao Chen <dehao@google.com>
+
+ * g++.dg/debug/dwarf2/deallocator.C: New test.
+
+2012-09-05 Cary Coutant <ccoutant@gmail.com>
+
+ Backport trunk patch to fix a problem where type signature does
+ not include the type's context.
+
+ 2012-07-19 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/debug/dwarf2/nested-4.C: New.
+
+2012-08-16 Ollie Wild <aaw@google.com>
+
+ PR c++/54197
+ * g++.dg/init/lifetime3.C: New test.
+
+2012-08-09 Cary Coutant <ccoutant@google.com>
+
+ Backport of pending upstream patch.
+
+ * g++.dg/debug/dwarf2/dwarf4-nested.C: New test case.
+ * g++.dg/debug/dwarf2/dwarf4-typedef.C: Add
+ -fdebug-types-section flag.
+
+2012-08-07 Cary Coutant <ccoutant@google.com>
+
+ Backport r190190 from trunk.
+
+ * g++.dg/debug/dwarf2/non-virtual-thunk.C: New test case.
+
+2012-08-02 Simon Baldwin <simonb@google.com>
+
+ Port r190071 from google/main.
+
+ 2012-08-01 Simon Baldwin <simonb@google.com>
+
+ * gcc.dg/tree-prof/lipo/lipo.exp: Add -fno-section-anchors to
+ profile_option and feedback_option for powerpc targets. Workround
+ for Google ref b/6663281.
+ * g++.dg/tree-prof/lipo/lipo.exp: Likewise.
+
+2012-08-01 Diego Novillo <dnovillo@google.com>
+
+ Backport r189720 from gcc-4_7-branch
+
+ 2012-07-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/54038
+ * g++.dg/other/array7.C: New.
+
+2012-08-01 Dehao Chen <dehao@google.com>
+
+ Backport r190015 from trunk.
+
+ 2012-07-31 Dehao Chen <dehao@google.com>
+ * predict.c (tree_estimate_probability_driver): Normalize the
+ loop when initializing the loop optimizer.
+
+2012-07-24 Cary Coutant <ccoutant@google.com>
+
+ Backport Fission patches from trunk at r188195, r188857, r189084,
+ r189094, and r189392.
+
+ 2012-07-09 Sterling Augustine <saugustine@google.com>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: New.
+
+2012-06-15 Cary Coutant <ccoutant@google.com>
+
+ Revert Fission patches r182490, r182891, r183042, and r183320.
+ This will clear the way to backport the final patches from trunk.
+
+ 2012-01-04 Sterling Augustine <saugustine@google.com>
+
+ * g++.dg/diagnostic/bindings1.C: Adjust expected output.
+ * g++.dg/ext/pretty3.C: Likewise.
+ * g++.dg/pr44486.C: Likewise.
+ * g++.dg/warn/Wuninitializable-member.C: Likewise.
+ * g++.dg/warn/pr35711.C: Likewise.
+ * g++.old-deja/g++.pt/memtemp77.C: Likewise.
+
+2012-06-07 Easwaran Raman <eraman@google.com>
+ Backport r179412 from google/gcc-4_6 branch.
+ 2011-09-30 Easwaran Raman <eraman@google.com>
+
+ * gcc.dg/sample-profile-generate-1.c: New test.
+
+2012-05-30 Dehao Chen <dehao@google.com>
+
+ * g++.dg/predict-loop-exit-1.C: New test.
+ * g++.dg/predict-loop-exit-2.C: New test.
+ * g++.dg/predict-loop-exit-3.C: New test.
+
+2012-05-15 Ollie Wild <aaw@google.com>
+
+ * g++.dg/cpp0x/constexpr-static8.C: Replace -fpermissive with -pedantic.
+ * g++.dg/cpp0x/constexpr-static8_nonpedantic.C: New test.
+ * g++.old-deja/g++.ext/memconst.C: Compile with -pedantic
+ -pedantic-errors to work around test failures with -std=gnu++11.
+
+
+2012-05-03 Dehao Chen <dehao@google.com>
+
+ Backport r185949 from google-main.
+
+ 2012-03-29 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/predict-1.c: Check if LOOP_IV_COMPARE static predict
+ heuristic is working properly.
+ * gcc.dg/predict-2.c: Likewise
+ * gcc.dg/predict-3.c: Likewise
+ * gcc.dg/predict-4.c: Likewise
+ * gcc.dg/predict-5.c: Likewise
+ * gcc.dg/predict-6.c: Likewise
diff --git a/gcc/testsuite/c-c++-common/pr54988.c b/gcc/testsuite/c-c++-common/pr54988.c
new file mode 100644
index 00000000000..59406d6ab24
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr54988.c
@@ -0,0 +1,20 @@
+/* PR c++/54988 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
+
+#if defined(__i386__) || defined(__x86_64__)
+#pragma GCC target "fpmath=sse"
+#endif
+
+static inline __attribute__ ((always_inline)) int
+foo (int x)
+{
+ return x;
+}
+
+int
+bar (int x)
+{
+ return foo (x);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
new file mode 100644
index 00000000000..bd904372367
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
@@ -0,0 +1,7 @@
+// PR c++/55015
+// { dg-do link }
+// { dg-options -std=c++11 }
+
+typedef void (*VoidFunc)();
+inline VoidFunc GetFunc() { return [](){}; }
+int main() { VoidFunc func = GetFunc(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
new file mode 100644
index 00000000000..daaa33938ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
@@ -0,0 +1,27 @@
+// PR c++/54947
+// { dg-options -std=gnu++11 }
+
+struct X
+{
+ template<typename L>
+ X(L)
+ { }
+};
+
+template<typename A>
+ void
+ test()
+ {
+ int i = 0;
+
+ A a_ok_1( [=] { return i; } ); // OK
+ A a_ok_2( [i] { return i; } ); // OK
+
+ A a_err_1{ [i] { return i; } }; // error
+ A a_err_2{ [=] { return i; } }; // error
+ }
+
+int main()
+{
+ test<X>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
new file mode 100644
index 00000000000..acf4eaa7fcb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
@@ -0,0 +1,32 @@
+// PR c++/53137
+// { dg-options -std=c++11 }
+
+template <typename STORE>
+void getParent(STORE& tStore)
+{
+}
+
+struct Store
+{
+ template <typename CheckParentFunc>
+ void updateChildCommon(CheckParentFunc c)
+ {
+ c();
+ }
+
+ template <typename T>
+ int& getStore();
+
+ template <typename T>
+ void updateChild(const T& obj)
+ {
+ updateChildCommon([this] () { getParent(getStore<T>()); });
+ }
+
+ void update(int obj);
+};
+
+void Store::update(int obj)
+{
+ updateChild(obj);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic134.C b/gcc/testsuite/g++.dg/cpp0x/variadic134.C
new file mode 100644
index 00000000000..d4181b02c8e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic134.C
@@ -0,0 +1,17 @@
+// PR c++/53862
+// { dg-do compile { target c++11 } }
+
+typedef unsigned long size_t;
+
+template<typename> struct is_scalar { static const bool value = true; };
+template<bool, typename T> struct enable_if { typedef T type; };
+
+template <size_t N, typename... Args>
+void f(Args...) {}
+
+template <size_t N, typename T, typename... Args>
+typename enable_if<is_scalar<T>::value, void>::type f(T, Args...) {}
+
+int main() {
+ f<1>(1);
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr54828.C b/gcc/testsuite/g++.dg/debug/pr54828.C
new file mode 100644
index 00000000000..80b9a3ce070
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr54828.C
@@ -0,0 +1,14 @@
+// PR debug/54828
+// { dg-do compile }
+// { dg-options "-g" }
+
+struct T { T (); virtual ~T (); };
+struct S : public virtual T { S (); virtual ~S (); };
+int v;
+void foo (char *);
+
+S::S ()
+{
+ char s[v];
+ foo (s);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr55331.C b/gcc/testsuite/g++.dg/opt/pr55331.C
new file mode 100644
index 00000000000..4717db8091f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55331.C
@@ -0,0 +1,14 @@
+// PR tree-optimization/55331
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-fre" }
+
+struct A {};
+
+void
+foo (A *p, bool x)
+{
+ A a;
+ char *e = (char *) (&a + 1);
+ if (x)
+ __builtin_memmove (p, &a, e - (char *) &a);
+}
diff --git a/gcc/testsuite/g++.dg/other/abstract3.C b/gcc/testsuite/g++.dg/other/abstract3.C
index 528b7d79360..95e293e501b 100644
--- a/gcc/testsuite/g++.dg/other/abstract3.C
+++ b/gcc/testsuite/g++.dg/other/abstract3.C
@@ -8,5 +8,5 @@ struct A // { dg-message "note" }
struct B
{
A a; // { dg-error "abstract" }
- B() : a() {} // { dg-error "abstract" }
+ B() : a() {}
};
diff --git a/gcc/testsuite/g++.dg/template/meminit3.C b/gcc/testsuite/g++.dg/template/meminit3.C
new file mode 100644
index 00000000000..b6824491f37
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/meminit3.C
@@ -0,0 +1,12 @@
+// PR c++/54744
+
+template <typename T>
+struct base {
+ typedef base base_type;
+};
+
+template <typename T>
+struct derived : base<T> {
+ typedef typename derived::base_type::base_type base_type;
+ derived() : base_type() {}
+};
diff --git a/gcc/testsuite/g++.dg/template/new11.C b/gcc/testsuite/g++.dg/template/new11.C
new file mode 100644
index 00000000000..76f6c66997f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/new11.C
@@ -0,0 +1,28 @@
+// PR c++/54984
+// { dg-do run }
+
+int n = 1;
+
+void* operator new(__SIZE_TYPE__)
+{
+ n = -1;
+ return &n;
+}
+
+template <class T>
+struct Foo
+{
+ Foo()
+ : x(new int)
+ {
+ if (*x != -1)
+ __builtin_abort();
+ }
+
+ int* x;
+};
+
+int main()
+{
+ Foo<float> foo;
+}
diff --git a/gcc/testsuite/g++.dg/template/param1.C b/gcc/testsuite/g++.dg/template/param1.C
index a8c3791254f..e3784736fc4 100644
--- a/gcc/testsuite/g++.dg/template/param1.C
+++ b/gcc/testsuite/g++.dg/template/param1.C
@@ -2,11 +2,11 @@
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
-template<int> struct A // { dg-error "declaration" }
+template<int> struct A
{
A();
};
-template<int N, char> A<N>::A() {} // { dg-error "invalid use of incomplete type" }
+template<int N, char> A<N>::A() {} // { dg-error "got 2 template parameters|1 required" }
A<0> a;
diff --git a/gcc/testsuite/g++.dg/template/pr54858.C b/gcc/testsuite/g++.dg/template/pr54858.C
new file mode 100644
index 00000000000..51610ad689a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr54858.C
@@ -0,0 +1,21 @@
+// PR c++/54858
+// { dg-do compile }
+
+template <int> struct A {};
+template <typename T, T *> struct B {};
+template <typename D> struct C
+{
+ A<0> c0; B<A<0>, &C::c0> d0; // { dg-error "could not convert template argument" }
+ A<0> c1; B<A<0>, &C::c1> d1; // { dg-error "could not convert template argument" }
+ A<0> c2; B<A<0>, &C::c2> d2; // { dg-error "could not convert template argument" }
+ A<0> c3; B<A<0>, &C::c3> d3; // { dg-error "could not convert template argument" }
+ A<0> c4; B<A<0>, &C::c4> d4; // { dg-error "could not convert template argument" }
+ A<0> c5; B<A<0>, &C::c5> d5; // { dg-error "could not convert template argument" }
+ A<0> c6; B<A<0>, &C::c6> d6; // { dg-error "could not convert template argument" }
+ A<0> c7; B<A<0>, &C::c7> d7; // { dg-error "could not convert template argument" }
+ A<0> c8; B<A<0>, &C::c8> d8; // { dg-error "could not convert template argument" }
+ A<0> c9; B<A<0>, &C::c9> d9; // { dg-error "could not convert template argument" }
+ A<0> ca; B<A<0>, &C::ca> da; // { dg-error "could not convert template argument" }
+ A<0> cb; B<A<0>, &C::cb> db; // { dg-error "could not convert template argument" }
+};
+C<int> e;
diff --git a/gcc/testsuite/g++.dg/template/typedef40.C b/gcc/testsuite/g++.dg/template/typedef40.C
new file mode 100644
index 00000000000..1d8be358a20
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typedef40.C
@@ -0,0 +1,21 @@
+// PR c++/55058
+
+template <typename T>
+struct A { };
+
+template <typename T>
+struct B {
+ B(const A<T> T::* p);
+ typedef A<T> D;
+};
+
+template <typename T>
+B<T>::B(const D T::* p) { }
+
+struct C {
+ C() : e() {};
+
+ const A<C> e;
+};
+
+B<C> g(&C::e);
diff --git a/gcc/testsuite/g++.dg/torture/20121105-1.C b/gcc/testsuite/g++.dg/torture/20121105-1.C
new file mode 100644
index 00000000000..03323421a5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/20121105-1.C
@@ -0,0 +1,42 @@
+// PR tree-optimization/54986
+// Reported by Remi Vanicat <vanicat@debian.org>
+// Reduced testcase by Markus Trippelsdorf <markus@trippelsdorf.de>
+
+struct A;
+struct B
+{
+ int *_ptr;
+ bool operator==(B *p1)
+ {
+ return p1->_ptr;
+ }
+};
+struct C {
+ A* ref_SYMBptr();
+};
+struct A
+{
+ B sommet;
+};
+typedef C *gen_op_context;
+struct D
+{
+ D(gen_op_context) {}
+};
+
+D c(0);
+const long d = (long)&c;
+B *const e = (B *)&d;
+
+static bool
+fn1(C& p1)
+{
+ return p1.ref_SYMBptr()->sommet == e;
+}
+
+void
+fn2()
+{
+ C b;
+ fn1(b);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr54902.C b/gcc/testsuite/g++.dg/torture/pr54902.C
new file mode 100644
index 00000000000..790ffe5fcb5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr54902.C
@@ -0,0 +1,131 @@
+// { dg-do compile }
+
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Iterator> struct iterator_traits {
+ };
+ template<typename _Tp> struct iterator_traits<_Tp*> {
+ typedef _Tp& reference;
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ using std::iterator_traits;
+ template<typename _Iterator, typename _Container> class __normal_iterator {
+ _Iterator _M_current;
+ typedef iterator_traits<_Iterator> __traits_type;
+ public:
+ typedef typename __traits_type::reference reference;
+ explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) {
+ }
+ reference operator*() const {
+ return *_M_current;
+ }
+ __normal_iterator operator++(int) {
+ return __normal_iterator(_M_current++);
+ }
+ };
+ template<typename _Tp> class new_allocator {
+ public:
+ typedef _Tp* pointer;
+ template<typename _Tp1> struct rebind {
+ typedef new_allocator<_Tp1> other;
+ };
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Alloc> struct __alloc_traits {
+ typedef typename _Alloc::pointer pointer;
+ template<typename _Tp> struct rebind {
+ typedef typename _Alloc::template rebind<_Tp>::other other;
+ };
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp, typename _Alloc> struct _Vector_base {
+ typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type;
+ typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer;
+ struct _Vector_impl : public _Tp_alloc_type {
+ pointer _M_start;
+ };
+ _Vector_impl _M_impl;
+ };
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> {
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ public:
+ typedef typename _Base::pointer pointer;
+ typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
+ iterator begin() {
+ return iterator(this->_M_impl._M_start);
+ }
+ };
+}
+class myServer {
+ static std::vector<myServer *> server_list;
+ class Callback;
+ class myFolder *currentFolder;
+ static bool eventloop(Callback *);
+};
+extern "C" {
+ typedef unsigned int uint32_t;
+ typedef uint32_t unicode_char;
+ extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+};
+class CursesObj {
+};
+class Curses : public CursesObj {
+public:
+ class Key {
+ public:
+ unicode_char ukey;
+ const char *keycode;
+ Key(unicode_char ch) : ukey(ch), keycode(0) {
+ }
+ bool plain() const {
+ }
+ bool nokey() const {
+ }
+ bool operator==(const Key &k) const {
+ return strcmp(keycode ? keycode:
+ "", k.keycode ? k.keycode:
+ "") == 0 && ukey == k.ukey;
+ }
+ };
+ static bool processKey(const Key &k);
+};
+class CursesContainer : public Curses {
+};
+class myFolder {
+public:
+ void checkExpunged();
+};
+class Typeahead {
+public:
+ static Typeahead *typeahead;
+ bool empty() {
+ }
+ Curses::Key pop() {
+ }
+};
+class CursesScreen : public CursesContainer {
+public:
+ Key getKey();
+};
+using namespace std;
+extern CursesScreen *cursesScreen;
+bool myServer::eventloop(myServer::Callback *callback) {
+ Curses::Key k1= (callback == __null && !Typeahead::typeahead->empty() ? Typeahead::typeahead->pop() : cursesScreen->getKey());
+ if (callback == __null || (k1.plain() && k1.ukey == '\x03')) {
+ if (!k1.nokey()) {
+ bool rc=Curses::processKey(k1);
+ if (rc) { while (k1.plain() && k1 == '\x03' && !Typeahead::typeahead->empty()) Typeahead::typeahead->pop(); }
+ }
+ }
+ vector<myServer *>::iterator b=server_list.begin();
+ while (1) {
+ myServer *p= *b++;
+ if (p->currentFolder) p->currentFolder->checkExpunged();
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20121107-1.c b/gcc/testsuite/gcc.c-torture/compile/20121107-1.c
new file mode 100644
index 00000000000..a86206702af
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20121107-1.c
@@ -0,0 +1,14 @@
+/* PR middle-end/55219 */
+/* Testcase by Markus Trippelsdorf <markus@trippelsdorf.de> */
+
+int x, c, d, e, f, g, h, i;
+double j;
+const int k;
+const enum { B } a;
+void
+fn1 (void)
+{
+ h = (g ? c : g ? f : g ? e : g ? i : g ? f : g ? e : g ? d : x)
+ + (a ? : a ? : a ? : a ? : a ? : a ? : a ? : a ? : a ? : a ? : a
+ ? j : a ? : 0 ? : a ? : a ? : a ? : a ? : a ? : a ? k : a ? : x);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr54985.c b/gcc/testsuite/gcc.c-torture/execute/pr54985.c
new file mode 100644
index 00000000000..678c9f47ae7
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr54985.c
@@ -0,0 +1,36 @@
+
+typedef struct st {
+ int a;
+} ST;
+
+int __attribute__((noinline,noclone))
+foo(ST *s, int c)
+{
+ int first = 1;
+ int count = c;
+ ST *item = s;
+ int a = s->a;
+ int x;
+
+ while (count--)
+ {
+ x = item->a;
+ if (first)
+ first = 0;
+ else if (x >= a)
+ return 1;
+ a = x;
+ item++;
+ }
+ return 0;
+}
+
+extern void abort (void);
+
+int main ()
+{
+ ST _1[2] = {{2}, {1}};
+ if (foo(_1, 2) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53701.c b/gcc/testsuite/gcc.dg/pr53701.c
new file mode 100644
index 00000000000..2c852238110
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53701.c
@@ -0,0 +1,59 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O3 -fselective-scheduling2 -fsel-sched-pipelining" } */
+typedef unsigned short int uint16_t;
+typedef unsigned long int uintptr_t;
+typedef struct GFX_VTABLE
+{
+ int color_depth;
+ unsigned char *line[];
+}
+BITMAP;
+extern int _drawing_mode;
+extern BITMAP *_drawing_pattern;
+extern int _drawing_y_anchor;
+extern unsigned int _drawing_x_mask;
+extern unsigned int _drawing_y_mask;
+extern uintptr_t bmp_write_line (BITMAP *, int);
+ void
+_linear_hline15 (BITMAP * dst, int dx1, int dy, int dx2, int color)
+{
+ int w;
+ if (_drawing_mode == 0)
+ {
+ int x, curw;
+ unsigned short *sline =
+ (unsigned short *) (_drawing_pattern->
+ line[((dy) -
+ _drawing_y_anchor) & _drawing_y_mask]);
+ unsigned short *s;
+ unsigned short *d =
+ ((unsigned short *) (bmp_write_line (dst, dy)) + (dx1));
+ s = ((unsigned short *) (sline) + (x));
+ if (_drawing_mode == 2)
+ {
+ }
+ else if (_drawing_mode == 3)
+ {
+ do
+ {
+ w -= curw;
+ do
+ {
+ unsigned long c = (*(s));
+ if (!((unsigned long) (c) == 0x7C1F))
+ {
+ (*((uint16_t *) ((uintptr_t) (d))) = ((color)));
+ }
+ ((s)++);
+ }
+ while (--curw > 0);
+ s = sline;
+ curw =
+ (((w) <
+ ((int) _drawing_x_mask +
+ 1)) ? (w) : ((int) _drawing_x_mask + 1));
+ }
+ while (curw > 0);
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr55019.c b/gcc/testsuite/gcc.dg/pr55019.c
new file mode 100644
index 00000000000..1548fb258c0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55019.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -funroll-loops" } */
+/* { dg-add-options ieee } */
+
+extern void exit (int);
+extern void abort (void);
+
+void
+compare (double a, double b)
+{
+ do
+ {
+ double s1 = __builtin_copysign ((double) 1.0, a);
+ double s2 = __builtin_copysign ((double) 1.0, b);
+
+ if (s1 != s2)
+ abort ();
+
+ if ((__builtin_isnan (a) != 0) != (__builtin_isnan (b) != 0))
+ abort ();
+
+ if ((a != b) != (__builtin_isnan (a) != 0))
+ abort ();
+ } while (0);
+}
+
+int
+main ()
+{
+ double a = 0.0;
+ double b = 0.0;
+ _Complex double cr = __builtin_complex (a, b);
+ static _Complex double cs = __builtin_complex (0.0, 0.0);
+
+ compare (__real__ cr, 0.0);
+ compare (__imag__ cr, 0.0);
+ compare (__real__ cs, 0.0);
+ compare (__imag__ cs, 0.0);
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr55570.c b/gcc/testsuite/gcc.dg/pr55570.c
new file mode 100644
index 00000000000..903bb033df9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55570.c
@@ -0,0 +1,4 @@
+/* PR c/55570 */
+/* { dg-do compile } */
+
+char array[16] __attribute__((aligned (SOME_NOT_DEFINED_MACRO))); /* { dg-error "requested alignment is not an integer constant" } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr53663-1.c b/gcc/testsuite/gcc.dg/torture/pr53663-1.c
new file mode 100644
index 00000000000..3392ddecb51
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53663-1.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+union u
+{
+ int i;
+ _Bool b;
+};
+
+void f(union u * vp, union u v)
+{
+ *vp = v;
+}
+
+int main()
+{
+ union u v;
+ union u v1;
+ union u v2;
+
+ v.i = 10;
+ f(&v1, v);
+
+ v.b = 0;
+ f(&v2, v);
+ if (v2.b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53663-2.c b/gcc/testsuite/gcc.dg/torture/pr53663-2.c
new file mode 100644
index 00000000000..9589a9e2054
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53663-2.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+union u
+{
+ int i;
+ short f;
+} v;
+
+short foo (short *f)
+{
+ *f = 1;
+ v.i = 0;
+ v.f = 0;
+ return *f;
+}
+
+int main()
+{
+ if (foo (&v.f) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53663-3.c b/gcc/testsuite/gcc.dg/torture/pr53663-3.c
new file mode 100644
index 00000000000..96af5db10ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53663-3.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+union u
+{
+ int i;
+ float f;
+} v;
+
+float foo (float *f)
+{
+ *f = 1;
+ v.i = 0;
+ v.f = 0.;
+ return *f;
+}
+
+int main()
+{
+ if (foo (&v.f) != 0.)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54877.c b/gcc/testsuite/gcc.dg/torture/pr54877.c
new file mode 100644
index 00000000000..cee406e50d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54877.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/54877 */
+/* { dg-do run } */
+/* { dg-options "-ffast-math" } */
+
+extern void abort (void);
+
+int
+foo (void)
+{
+ double d;
+ int i;
+ for (i = 0, d = 0; i < 64; i++)
+ d--;
+ return (int) d;
+}
+
+int
+main ()
+{
+ if (foo () != -64)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54920.c b/gcc/testsuite/gcc.dg/torture/pr54920.c
new file mode 100644
index 00000000000..6b99e9ed2eb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54920.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */
+
+typedef short __v8hi __attribute__ ((__vector_size__ (16)));
+typedef long long __m128i __attribute__ ((__vector_size__ (16)));
+int a;
+__m128i b;
+
+void
+fn1 ()
+{
+ while (1)
+ b = (__m128i) (__v8hi) { a, 0, 0, 0, 0, 0 };
+}
diff --git a/gcc/testsuite/gcc.target/arm/arm.exp b/gcc/testsuite/gcc.target/arm/arm.exp
index 0838d37b3f0..dc6c16ad522 100644
--- a/gcc/testsuite/gcc.target/arm/arm.exp
+++ b/gcc/testsuite/gcc.target/arm/arm.exp
@@ -30,6 +30,11 @@ if ![info exists DEFAULT_CFLAGS] then {
set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
+# This variable should only apply to tests called in this exp file.
+global dg_runtest_extra_prunes
+set dg_runtest_extra_prunes ""
+lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch"
+
# Initialize `dg'.
dg-init
@@ -39,3 +44,5 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
# All done.
dg-finish
+
+set dg_runtest_extra_prunes ""
diff --git a/gcc/testsuite/gcc.target/arm/pr54892.c b/gcc/testsuite/gcc.target/arm/pr54892.c
new file mode 100644
index 00000000000..a7fe1bc6676
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr54892.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+
+int set_role(unsigned char role_id, short m_role)
+{
+ return __sync_bool_compare_and_swap(&m_role, -1, role_id);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
index c2511c643b4..e7eef6d7a90 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
@@ -14,6 +14,6 @@ avx_test (void)
c[i] = a[i] * b[i+3];
}
-/* { dg-final { scan-assembler-not "avx_movups256/1" } } */
-/* { dg-final { scan-assembler "sse_movups/1" } } */
+/* { dg-final { scan-assembler-not "avx_loadups256" } } */
+/* { dg-final { scan-assembler "sse_loadups" } } */
/* { dg-final { scan-assembler "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
index 9d7167304e3..3f4fbf76479 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
@@ -24,6 +24,6 @@ avx_test (void)
}
}
-/* { dg-final { scan-assembler-not "avx_movdqu256/1" } } */
-/* { dg-final { scan-assembler "sse2_movdqu/1" } } */
+/* { dg-final { scan-assembler-not "avx_loaddqu256" } } */
+/* { dg-final { scan-assembler "sse2_loaddqu" } } */
/* { dg-final { scan-assembler "vinsert.128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
index efb5f573fae..b0e0e79bdd8 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
@@ -14,6 +14,6 @@ avx_test (void)
c[i] = a[i] * b[i+3];
}
-/* { dg-final { scan-assembler-not "avx_movupd256/1" } } */
-/* { dg-final { scan-assembler "sse2_movupd/1" } } */
+/* { dg-final { scan-assembler-not "avx_loadupd256" } } */
+/* { dg-final { scan-assembler "sse2_loadupd" } } */
/* { dg-final { scan-assembler "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
index 7c015a8b90a..b3927be70ab 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
@@ -14,6 +14,6 @@ avx_test (void)
b[i] = a[i+3] * 2;
}
-/* { dg-final { scan-assembler "avx_movups256/1" } } */
-/* { dg-final { scan-assembler-not "avx_movups/1" } } */
+/* { dg-final { scan-assembler "avx_loadups256" } } */
+/* { dg-final { scan-assembler-not "sse_loadups" } } */
/* { dg-final { scan-assembler-not "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
index 0b5839669a7..1a53ba14a00 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
@@ -17,6 +17,6 @@ avx_test (void)
d[i] = c[i] * 20.0;
}
-/* { dg-final { scan-assembler-not "avx_movups256/2" } } */
+/* { dg-final { scan-assembler-not "avx_storeups256" } } */
/* { dg-final { scan-assembler "vmovups.*\\*movv4sf_internal/3" } } */
/* { dg-final { scan-assembler "vextractf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
index eac460fef97..e98d1b684de 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
@@ -24,6 +24,6 @@ avx_test (void)
}
}
-/* { dg-final { scan-assembler-not "avx_movdqu256/2" } } */
+/* { dg-final { scan-assembler-not "avx_storedqu256" } } */
/* { dg-final { scan-assembler "vmovdqu.*\\*movv16qi_internal/3" } } */
/* { dg-final { scan-assembler "vextract.128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
index 753625892d7..26c993be7e9 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
@@ -17,6 +17,6 @@ avx_test (void)
d[i] = c[i] * 20.0;
}
-/* { dg-final { scan-assembler-not "avx_movupd256/2" } } */
+/* { dg-final { scan-assembler-not "avx_storeupd256" } } */
/* { dg-final { scan-assembler "vmovupd.*\\*movv2df_internal/3" } } */
/* { dg-final { scan-assembler "vextractf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
index 39b6f3bef16..6d734faa25e 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
@@ -14,7 +14,7 @@ avx_test (void)
b[i+3] = a[i] * c[i];
}
-/* { dg-final { scan-assembler "avx_movups256/2" } } */
-/* { dg-final { scan-assembler-not "avx_movups/2" } } */
+/* { dg-final { scan-assembler "avx_storeups256" } } */
+/* { dg-final { scan-assembler-not "sse_storeups" } } */
/* { dg-final { scan-assembler-not "\\*avx_movv4sf_internal/3" } } */
/* { dg-final { scan-assembler-not "vextractf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr55142-1.c b/gcc/testsuite/gcc.target/i386/pr55142-1.c
new file mode 100644
index 00000000000..28375b54765
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55142-1.c
@@ -0,0 +1,34 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -mx32 -fpic" } */
+
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef int32_t Elf32_Sword;
+typedef struct
+{
+ Elf32_Sword d_tag;
+} Elf32_Dyn;
+struct link_map
+{
+ Elf32_Dyn *l_ld;
+ Elf32_Dyn *l_info[34];
+};
+extern struct link_map _dl_rtld_map __attribute__ ((visibility ("hidden")));
+static void elf_get_dynamic_info (struct link_map *l)
+{
+ Elf32_Dyn *dyn = l->l_ld;
+ Elf32_Dyn **info;
+ info = l->l_info;
+ while (dyn->d_tag != 0)
+ {
+ if ((uint32_t) (0x6ffffeff - dyn->d_tag) < 11)
+ info[0x6ffffeff - dyn->d_tag + 12] = dyn;
+ ++dyn;
+ }
+}
+void
+foo (void)
+{
+ elf_get_dynamic_info (&_dl_rtld_map);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55142-2.c b/gcc/testsuite/gcc.target/i386/pr55142-2.c
new file mode 100644
index 00000000000..9daae9dca95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55142-2.c
@@ -0,0 +1,33 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O3 -mx32 -fpic" } */
+/* { dg-final { scan-assembler-not "movl\[\\t \]*%.*,\[\\t \]*-1073742592\\(%r(.x|.i|.p|\[1-9\]*)\\)" } } */
+
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef uint32_t Elf32_Word;
+typedef int32_t Elf32_Sword;
+typedef uint32_t Elf32_Addr;
+typedef struct {
+ Elf32_Sword d_tag;
+ union {
+ Elf32_Word d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
+} Elf32_Dyn;
+struct link_map {
+ Elf32_Dyn *l_ld;
+ Elf32_Dyn *l_info[34 + 16 + 3 + 12 + 11];
+};
+void
+elf_get_dynamic_info (struct link_map *l)
+{
+ Elf32_Dyn *dyn = l->l_ld;
+ Elf32_Dyn **info = l->l_info;
+ typedef Elf32_Word d_tag_utype;
+ while (dyn->d_tag != 0) {
+ if ((d_tag_utype) (0x6ffffeff - dyn->d_tag) < 11)
+ info[(0x6ffffeff - dyn->d_tag) + 34 + 16 + 3 + 12] = dyn;
+ ++dyn;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55597.c b/gcc/testsuite/gcc.target/i386/pr55597.c
new file mode 100644
index 00000000000..cafe194c1b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55597.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fPIC -mx32" } */
+
+struct initial_sp
+{
+ void *sp;
+ int mask;
+};
+
+__thread struct initial_sp __morestack_initial_sp;
+
+void foo (int *);
+
+void __morestack_release_segments (void)
+{
+ foo (&__morestack_initial_sp.mask);
+}
diff --git a/gcc/testsuite/gfortran.dg/allocate_error_4.f90 b/gcc/testsuite/gfortran.dg/allocate_error_4.f90
new file mode 100644
index 00000000000..6652b472f49
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_error_4.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! PR fortran/55314 - the second allocate statement was rejected.
+
+program main
+ implicit none
+ integer :: max_nb
+ type comm_mask
+ integer(4), pointer :: mask(:)
+ end type comm_mask
+ type (comm_mask), allocatable, save :: encode(:,:)
+ max_nb=2
+ allocate( encode(1:1,1:max_nb))
+ allocate( encode(1,1)%mask(1),encode(1,2)%mask(1))
+ deallocate( encode(1,1)%mask,encode(1,2)%mask)
+ allocate( encode(1,1)%mask(1),encode(1,1)%mask(1)) ! { dg-error "also appears at" }
+end program main
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_13.f90 b/gcc/testsuite/gfortran.dg/class_allocate_13.f90
new file mode 100644
index 00000000000..64f37dc59b5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_allocate_13.f90
@@ -0,0 +1,31 @@
+! { dg-do run }
+!
+! PR 54784: [4.7/4.8 Regression] [OOP] wrong code in polymorphic allocation with SOURCE
+!
+! Contributed by Jeremy Kozdon <jkozdon@gmail.com>
+
+program bug
+ implicit none
+
+ type :: block
+ real, allocatable :: fields
+ end type
+
+ type :: list
+ class(block),allocatable :: B
+ end type
+
+ type :: domain
+ type(list),dimension(2) :: L
+ end type
+
+ type(domain) :: d
+ type(block) :: b1
+
+ allocate(b1%fields,source=5.)
+
+ allocate(d%L(2)%B,source=b1) ! wrong code
+
+ if (d%L(2)%B%fields/=5.) call abort()
+
+end program
diff --git a/gcc/testsuite/gfortran.dg/namelist_76.f90 b/gcc/testsuite/gfortran.dg/namelist_76.f90
new file mode 100644
index 00000000000..acb3b2f6561
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_76.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR 55352: [4.7/4.8 Regression] Erroneous gfortran warning of unused module variable when variable is only used in namelist
+!
+! Contributed by <AstroFloyd@gmail.com>
+
+module data
+ implicit none
+ integer :: a
+end module data
+
+program test
+ use data, only: a
+ implicit none
+ a = 1
+ call write_data()
+end program test
+
+subroutine write_data()
+ use data, only: a
+ implicit none
+ namelist /write_data_list/ a
+ open(unit=10,form='formatted',status='replace',action='write',file='test.dat')
+ write(10, nml=write_data_list)
+ close(10)
+end subroutine write_data
+
+! { dg-final { cleanup-modules "data" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_class_1.f90 b/gcc/testsuite/gfortran.dg/transfer_class_1.f90
new file mode 100644
index 00000000000..00b3a2405f3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_class_1.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-Wsurprising" }
+!
+! PR 54917: [4.7/4.8 Regression] [OOP] TRANSFER on polymorphic variable causes ICE
+!
+! Contributed by Sean Santos <quantheory@gmail.com>
+
+subroutine test_routine1(arg)
+ implicit none
+ type test_type
+ integer :: test_comp
+ end type
+ class(test_type) :: arg
+ integer :: i
+ i = transfer(arg, 1)
+end subroutine
diff --git a/gcc/testsuite/gnat.dg/modular4.adb b/gcc/testsuite/gnat.dg/modular4.adb
new file mode 100644
index 00000000000..e8e8f2956e1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/modular4.adb
@@ -0,0 +1,11 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Modular4_Pkg; use Modular4_Pkg;
+
+procedure Modular4 is
+begin
+ for I in Zero .. F mod 8 loop
+ raise Program_Error;
+ end loop;
+end;
diff --git a/gcc/testsuite/gnat.dg/modular4_pkg.ads b/gcc/testsuite/gnat.dg/modular4_pkg.ads
new file mode 100644
index 00000000000..b38026201ed
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/modular4_pkg.ads
@@ -0,0 +1,9 @@
+package Modular4_Pkg is
+
+ type Word is mod 2**48;
+
+ Zero : constant Word := 0;
+
+ function F return Word;
+
+end Modular4_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/addr1.ads b/gcc/testsuite/gnat.dg/specs/addr1.ads
index ed048f68ef3..bcb833bec69 100644
--- a/gcc/testsuite/gnat.dg/specs/addr1.ads
+++ b/gcc/testsuite/gnat.dg/specs/addr1.ads
@@ -18,18 +18,18 @@ package Addr1 is
A: Arr (1 .. 4);
Obj1: Rec1;
- for Obj1'Address use A'Address; -- { dg-bogus "alignment" }
+ for Obj1'Address use A'Address; -- { dg-bogus "(alignment|erroneous)" }
Obj2: Rec2;
- for Obj2'Address use A'Address; -- { dg-bogus "alignment" }
+ for Obj2'Address use A'Address; -- { dg-bogus "(alignment|erroneous)" "" { xfail mips*-*-* } }
Obj3: Rec1;
- for Obj3'Address use A(1)'Address; -- { dg-bogus "alignment" }
+ for Obj3'Address use A(1)'Address; -- { dg-bogus "(alignment|erroneous)" }
Obj4: Rec1;
for Obj4'Address use A(2)'Address; -- { dg-warning "(alignment|erroneous)" }
Obj5: Rec1;
- for Obj5'Address use A(3)'Address; -- { dg-bogus "alignment" }
+ for Obj5'Address use A(3)'Address; -- { dg-bogus "(alignment|erroneous)" }
end Addr1;
diff --git a/gcc/testsuite/gnat.dg/specs/atomic1.ads b/gcc/testsuite/gnat.dg/specs/atomic1.ads
index 500cad787f3..02e98b64314 100644
--- a/gcc/testsuite/gnat.dg/specs/atomic1.ads
+++ b/gcc/testsuite/gnat.dg/specs/atomic1.ads
@@ -6,11 +6,11 @@ package Atomic1 is
type UA is access all Arr;
U : UA;
- pragma Atomic (U); -- { dg-error "atomic access" }
+ pragma Atomic (U); -- { dg-error "atomic access" "" { xfail mips*-*-* } }
type R is record
U : UA;
- pragma Atomic (U); -- { dg-error "atomic access" }
+ pragma Atomic (U); -- { dg-error "atomic access" "" { xfail mips*-*-* } }
end record;
end Atomic1;
diff --git a/gcc/testsuite/gnat.dg/stack_check3.adb b/gcc/testsuite/gnat.dg/stack_check3.adb
new file mode 100644
index 00000000000..734ed422733
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/stack_check3.adb
@@ -0,0 +1,36 @@
+-- { dg-do compile }
+-- { dg-options "-O -fstack-check" }
+
+package body Stack_Check3 is
+
+ type Int_Arr is array (1 .. 34) of Integer;
+
+ type Rec (D : Boolean := False) is
+ record
+ case D is
+ when True => IA : Int_Arr;
+ when False => null;
+ end case;
+ end record;
+
+ type Rec_Arr is array (1 .. 256) of Rec;
+
+ protected Prot_Arr is
+ procedure Reset;
+ private
+ A : Rec_Arr;
+ end Prot_Arr;
+
+ protected body Prot_Arr is
+ procedure Reset is
+ begin
+ A := (others => (D => False));
+ end Reset;
+ end Prot_Arr;
+
+ procedure Reset is
+ begin
+ Prot_Arr.Reset;
+ end Reset;
+
+end Stack_Check3;
diff --git a/gcc/testsuite/gnat.dg/stack_check3.ads b/gcc/testsuite/gnat.dg/stack_check3.ads
new file mode 100644
index 00000000000..869c418839e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/stack_check3.ads
@@ -0,0 +1,5 @@
+package Stack_Check3 is
+
+ procedure Reset;
+
+end Stack_Check3;
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index b6a73fe0d50..8d8c538706a 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -211,9 +211,13 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
proc gcc-dg-prune { system text } {
global additional_prunes
+ # Extra prune rules that will apply to tests defined in a .exp file.
+ # Always remember to clear it in .exp file after executed all tests.
+ global dg_runtest_extra_prunes
+
set text [prune_gcc_output $text]
- foreach p $additional_prunes {
+ foreach p "$additional_prunes $dg_runtest_extra_prunes" {
if { [string length $p] > 0 } {
# Following regexp matches a complete line containing $p.
regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
@@ -672,6 +676,7 @@ if { [info procs saved-dg-test] == [list] } {
set additional_files ""
set additional_sources ""
set additional_prunes ""
+ set dg_runtest_extra_prunes ""
set shouldfail 0
if [info exists compiler_conditional_xfail_data] {
unset compiler_conditional_xfail_data
@@ -809,3 +814,4 @@ proc gdb-exists { args } {
}
set additional_prunes ""
+set dg_runtest_extra_prunes ""
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 092677a4a4e..2c58b094d61 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1530,12 +1530,15 @@ process_options (void)
/* If the user specifically requested variable tracking with tagging
uninitialized variables, we need to turn on variable tracking.
(We already determined above that variable tracking is feasible.) */
- if (flag_var_tracking_uninit)
+ if (flag_var_tracking_uninit == 1)
flag_var_tracking = 1;
if (flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
+ if (flag_var_tracking_uninit == AUTODETECT_VALUE)
+ flag_var_tracking_uninit = flag_var_tracking;
+
if (flag_var_tracking_assignments == AUTODETECT_VALUE)
flag_var_tracking_assignments = flag_var_tracking
&& !(flag_selective_scheduling || flag_selective_scheduling2);
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index d1014e6d8b4..207b165d3b6 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -169,7 +169,8 @@ void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
- fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
+ fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
+ (unsigned HOST_WIDE_INT) (uintptr_t) ptr);
di->column += 15;
}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index e250a0e6abd..341023d4bc0 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3063,7 +3063,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
case NARY:
{
vn_nary_op_t nary = PRE_EXPR_NARY (expr);
- tree genop[4];
+ tree *genop = XALLOCAVEC (tree, nary->length);
unsigned i;
for (i = 0; i < nary->length; ++i)
{
@@ -4820,11 +4820,12 @@ init_pre (bool do_fre)
/* Deallocate data structures used by PRE. */
-static void
+static unsigned
fini_pre (bool do_fre)
{
bool do_eh_cleanup = !bitmap_empty_p (need_eh_cleanup);
bool do_ab_cleanup = !bitmap_empty_p (need_ab_cleanup);
+ unsigned todo = 0;
free (postorder);
VEC_free (bitmap_set_t, heap, value_expressions);
@@ -4851,10 +4852,12 @@ fini_pre (bool do_fre)
BITMAP_FREE (need_ab_cleanup);
if (do_eh_cleanup || do_ab_cleanup)
- cleanup_tree_cfg ();
+ todo = TODO_cleanup_cfg;
if (!do_fre)
loop_optimizer_finalize ();
+
+ return todo;
}
/* Main entry point to the SSA-PRE pass. DO_FRE is true if the caller
@@ -4933,7 +4936,7 @@ execute_pre (bool do_fre)
}
scev_finalize ();
- fini_pre (do_fre);
+ todo |= fini_pre (do_fre);
if (!do_fre)
/* TODO: tail_merge_optimize may merge all predecessors of a block, in which
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f7a0b53e8e0..c2bd59d6416 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1484,7 +1484,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
/* 3) Assignment from a constant. We can use folds native encode/interpret
routines to extract the assigned bits. */
- else if (CHAR_BIT == 8 && BITS_PER_UNIT == 8
+ else if (vn_walk_kind == VN_WALKREWRITE
+ && CHAR_BIT == 8 && BITS_PER_UNIT == 8
&& ref->size == maxsize
&& maxsize % BITS_PER_UNIT == 0
&& offset % BITS_PER_UNIT == 0
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index 25ec43ebd7d..4be35f69522 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1559,7 +1559,12 @@ tail_merge_optimize (unsigned int todo)
timevar_push (TV_TREE_TAIL_MERGE);
- calculate_dominance_info (CDI_DOMINATORS);
+ if (!dom_info_available_p (CDI_DOMINATORS))
+ {
+ /* PRE can leave us with unreachable blocks, remove them now. */
+ delete_unreachable_blocks ();
+ calculate_dominance_info (CDI_DOMINATORS);
+ }
init_worklist ();
while (!VEC_empty (same_succ, worklist))
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 707c8df3ec5..a2860f6f978 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -574,6 +574,44 @@ simplify_control_stmt_condition (edge e,
return cached_lhs;
}
+/* Return TRUE if the statement at the end of e->dest depends on
+ the output of any statement in BB. Otherwise return FALSE.
+
+ This is used when we are threading a backedge and need to ensure
+ that temporary equivalences from BB do not affect the condition
+ in e->dest. */
+
+static bool
+cond_arg_set_in_bb (edge e, basic_block bb)
+{
+ ssa_op_iter iter;
+ use_operand_p use_p;
+ gimple last = last_stmt (e->dest);
+
+ /* E->dest does not have to end with a control transferring
+ instruction. This can occurr when we try to extend a jump
+ threading opportunity deeper into the CFG. In that case
+ it is safe for this check to return false. */
+ if (!last)
+ return false;
+
+ if (gimple_code (last) != GIMPLE_COND
+ && gimple_code (last) != GIMPLE_GOTO
+ && gimple_code (last) != GIMPLE_SWITCH)
+ return false;
+
+ FOR_EACH_SSA_USE_OPERAND (use_p, last, iter, SSA_OP_USE | SSA_OP_VUSE)
+ {
+ tree use = USE_FROM_PTR (use_p);
+
+ if (TREE_CODE (use) == SSA_NAME
+ && gimple_code (SSA_NAME_DEF_STMT (use)) != GIMPLE_PHI
+ && gimple_bb (SSA_NAME_DEF_STMT (use)) == bb)
+ return true;
+ }
+ return false;
+}
+
/* TAKEN_EDGE represents the an edge taken as a result of jump threading.
See if we can thread around TAKEN_EDGE->dest as well. If so, return
the edge out of TAKEN_EDGE->dest that we can statically compute will be
@@ -707,19 +745,8 @@ thread_across_edge (gimple dummy_cond,
safe to thread this edge. */
if (e->flags & EDGE_DFS_BACK)
{
- ssa_op_iter iter;
- use_operand_p use_p;
- gimple last = gsi_stmt (gsi_last_bb (e->dest));
-
- FOR_EACH_SSA_USE_OPERAND (use_p, last, iter, SSA_OP_USE | SSA_OP_VUSE)
- {
- tree use = USE_FROM_PTR (use_p);
-
- if (TREE_CODE (use) == SSA_NAME
- && gimple_code (SSA_NAME_DEF_STMT (use)) != GIMPLE_PHI
- && gimple_bb (SSA_NAME_DEF_STMT (use)) == e->dest)
- goto fail;
- }
+ if (cond_arg_set_in_bb (e, e->dest))
+ goto fail;
}
stmt_count = 0;
@@ -760,7 +787,9 @@ thread_across_edge (gimple dummy_cond,
address. If DEST is not null, then see if we can thread
through it as well, this helps capture secondary effects
of threading without having to re-run DOM or VRP. */
- if (dest)
+ if (dest
+ && ((e->flags & EDGE_DFS_BACK) == 0
+ || ! cond_arg_set_in_bb (taken_edge, e->dest)))
{
/* We don't want to thread back to a block we have already
visited. This may be overly conservative. */
@@ -818,11 +847,16 @@ thread_across_edge (gimple dummy_cond,
e3 = taken_edge;
do
{
- e2 = thread_around_empty_block (e3,
- dummy_cond,
- handle_dominating_asserts,
- simplify,
- visited);
+ if ((e->flags & EDGE_DFS_BACK) == 0
+ || ! cond_arg_set_in_bb (e3, e->dest))
+ e2 = thread_around_empty_block (e3,
+ dummy_cond,
+ handle_dominating_asserts,
+ simplify,
+ visited);
+ else
+ e2 = NULL;
+
if (e2)
{
e3 = e2;
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 79c0f1dab7b..b08d7bbdcd1 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -4574,6 +4574,13 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
if (TREE_ASM_WRITTEN (decl))
return false;
+ /* Do not override explicit alignment set by the user when an explicit
+ section name is also used. This is a common idiom used by many
+ software projects. */
+ if (DECL_SECTION_NAME (decl) != NULL_TREE
+ && !DECL_HAS_IMPLICIT_SECTION_NAME_P (decl))
+ return false;
+
if (TREE_STATIC (decl))
return (alignment <= MAX_OFILE_ALIGNMENT);
else
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 978442d3b1b..0434342ce51 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2257,7 +2257,10 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi,
if (orig_code == MINUS_EXPR)
{
tree rhs = gimple_assign_rhs2 (def_stmt);
- tree negrhs = make_ssa_name (SSA_NAME_VAR (rhs), NULL);
+ tree var = TREE_CODE (rhs) == SSA_NAME
+ ? SSA_NAME_VAR (rhs)
+ : create_tmp_reg (TREE_TYPE (rhs), NULL);
+ tree negrhs = make_ssa_name (var, NULL);
gimple negate_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, negrhs,
rhs, NULL);
gimple_stmt_iterator gsi = gsi_for_stmt (def_stmt);
diff --git a/gcc/tree.c b/gcc/tree.c
index 8e3dc4238b3..d32210ee2ea 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -8444,14 +8444,19 @@ variably_modified_type_p (tree type, tree fn)
tree t;
/* Test if T is either variable (if FN is zero) or an expression containing
- a variable in FN. */
+ a variable in FN. If TYPE isn't gimplified, return true also if
+ gimplify_one_sizepos would gimplify the expression into a local
+ variable. */
#define RETURN_TRUE_IF_VAR(T) \
do { tree _t = (T); \
if (_t != NULL_TREE \
&& _t != error_mark_node \
&& TREE_CODE (_t) != INTEGER_CST \
&& TREE_CODE (_t) != PLACEHOLDER_EXPR \
- && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
+ && (!fn \
+ || (!TYPE_SIZES_GIMPLIFIED (type) \
+ && !is_gimple_sizepos (_t)) \
+ || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
return true; } while (0)
if (type == error_mark_node)
diff --git a/gcc/tree.h b/gcc/tree.h
index ed37aea4399..592a49813fa 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -491,9 +491,10 @@ struct GTY(()) tree_common {
TREE_ADDRESSABLE in
VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL
+ SSA_NAME
all types
CONSTRUCTOR, IDENTIFIER_NODE
- STMT_EXPR, it means we want the result of the enclosed expression
+ STMT_EXPR
CALL_EXPR_TAILCALL in
CALL_EXPR
@@ -1190,15 +1191,18 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
/* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address
of this is needed. So it cannot be in a register.
In a FUNCTION_DECL it has no meaning.
- In CONSTRUCTOR nodes, it means object constructed must be in memory.
In LABEL_DECL nodes, it means a goto for this label has been seen
from a place outside all binding contours that restore stack levels.
+ In an artificial SSA_NAME that points to a stack partition with at least
+ two variables, it means that at least one variable has TREE_ADDRESSABLE.
In ..._TYPE nodes, it means that objects of this type must be fully
addressable. This means that pieces of this object cannot go into
register parameters, for example. If this a function type, this
means that the value must be returned in memory.
+ In CONSTRUCTOR nodes, it means object constructed must be in memory.
In IDENTIFIER_NODEs, this means that some extern decl for this name
- had its address taken. That matters for inline functions. */
+ had its address taken. That matters for inline functions.
+ In a STMT_EXPR, it means we want the result of the enclosed expression. */
#define TREE_ADDRESSABLE(NODE) ((NODE)->base.addressable_flag)
/* Set on a CALL_EXPR if the call is in a tail position, ie. just before the
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 81ec50ca1b1..5b1a0f2c6b5 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,39 @@
+2012-12-04 Richard Henderson <rth@redhat.com>
+
+ PR bootstrap/55571
+ * Makefile.in (libgcc_s.so): Depend on and link with libgcc.a.
+
+2012-11-28 Richard Henderson <rth@redhat.com>
+
+ PR libgcc/48076
+ * emutls.c (__emutls_get_address): Avoid race condition between
+ obj->loc.offset read and emutls_key initialization.
+
+2012-11-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/55175
+ * config/i386/32/sfp-machine.h: Guard exception handling and
+ rounding handling code with _SOFT_FLOAT.
+ * config/i386/64/sfp-machine.h: Ditto.
+
+2012-10-31 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o
+ as extra_parts.
+
+2012-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sparc64-*-rtems*): Remove sparc/t-elf.
+
+2012-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.
+
+2012-10-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.host (powerpc-*-rtems*): Add rs6000/t-savresfgpr to
+ tmake_file.
+
2012-03-12 Richard Guenther <rguenther@suse.de>
* gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
@@ -20,7 +56,7 @@
* unwind-dw2-fde-dip.c: Don't include <elf.h> on OpenBSD.
(USE_PT_GNU_EH_FRAME): Define for OpenBSD.
(ElfW): Likewise.
-
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
@@ -28,7 +64,7 @@
2012-09-05 Georg-Johann Lay <avr@gjlay.de>
Backport from 2012-09-05 mainline r190697.
-
+
PR target/54461
* config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if
configured --with-avrlibc.
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index faf4179b724..743960bf4a6 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -928,7 +928,7 @@ libgcc-std.ver: $(srcdir)/libgcc-std.ver.in
sed -e 's/__PFX__/$(LIBGCC_VER_GNU_PREFIX)/g' \
-e 's/__FIXPTPFX__/$(LIBGCC_VER_FIXEDPOINT_GNU_PREFIX)/g' < $< > $@
-libgcc_s$(SHLIB_EXT): $(libgcc-s-objects) $(extra-parts)
+libgcc_s$(SHLIB_EXT): $(libgcc-s-objects) $(extra-parts) libgcc.a
# @multilib_flags@ is still needed because this may use
# $(GCC_FOR_TARGET) and $(LIBGCC2_CFLAGS) directly.
# @multilib_dir@ is not really necessary, but sometimes it has
@@ -936,7 +936,7 @@ libgcc_s$(SHLIB_EXT): $(libgcc-s-objects) $(extra-parts)
$(mkinstalldirs) $(MULTIDIR)
$(subst @multilib_flags@,$(CFLAGS) -B./,$(subst \
@multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_objs@,$(objects),$(subst \
+ @shlib_objs@,$(objects) libgcc.a,$(subst \
@shlib_base_name@,libgcc_s,$(subst \
@shlib_map_file@,$(mapfile),$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
diff --git a/libgcc/config.host b/libgcc/config.host
index 3f71d842415..8bef94b1080 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -693,6 +693,7 @@ m32r-*-elf*)
;;
m32r-*-rtems*)
tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
+ extra_parts="$extra_parts crtinit.o crtfini.o"
;;
m32rle-*-elf*)
tmake_file=t-fdpbit
@@ -891,7 +892,7 @@ powerpc-*-eabi*)
extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-linux* | powerpc64-*-linux*)
@@ -995,7 +996,10 @@ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
sh-*-rtems*)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
- $sh_ic_extra_parts $sh_opt_extra_parts"
+ libic_invalidate_array_4-100.a \
+ libic_invalidate_array_4-200.a \
+ libic_invalidate_array_4a.a \
+ libgcc-Os-4-200.a libgcc-4-300.a"
;;
sh-wrs-vxworks)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
@@ -1054,7 +1058,7 @@ sparc64-*-elf*)
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc64-*-rtems*)
- tmake_file="$tmake_file sparc/t-elf t-crtfm"
+ tmake_file="$tmake_file t-crtfm"
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc-wrs-vxworks)
diff --git a/libgcc/config/i386/32/sfp-machine.h b/libgcc/config/i386/32/sfp-machine.h
index 1600a7fe2c7..131b2c453f2 100644
--- a/libgcc/config/i386/32/sfp-machine.h
+++ b/libgcc/config/i386/32/sfp-machine.h
@@ -107,6 +107,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
R##_c = FP_CLS_NAN; \
} while (0)
+#ifndef _SOFT_FLOAT
#define FP_EX_INVALID 0x01
#define FP_EX_DENORM 0x02
#define FP_EX_DIVZERO 0x04
@@ -187,6 +188,7 @@ struct fenv
} while (0)
#define FP_ROUNDMODE (_fcw & 0xc00)
+#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 7a2a4beaaaf..f90305a7642 100644
--- a/libgcc/config/i386/64/sfp-machine.h
+++ b/libgcc/config/i386/64/sfp-machine.h
@@ -49,6 +49,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
R##_c = FP_CLS_NAN; \
} while (0)
+#ifndef _SOFT_FLOAT
#define FP_EX_INVALID 0x01
#define FP_EX_DENORM 0x02
#define FP_EX_DIVZERO 0x04
@@ -133,6 +134,7 @@ struct fenv
} while (0)
#define FP_ROUNDMODE (_fcw & 0xc00)
+#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
diff --git a/libgcc/emutls.c b/libgcc/emutls.c
index 22ea4403edb..f1b653b7d54 100644
--- a/libgcc/emutls.c
+++ b/libgcc/emutls.c
@@ -136,7 +136,7 @@ __emutls_get_address (struct __emutls_object *obj)
#ifndef __GTHREADS
abort ();
#else
- pointer offset = obj->loc.offset;
+ pointer offset = __atomic_load_n (&obj->loc.offset, __ATOMIC_ACQUIRE);
if (__builtin_expect (offset == 0, 0))
{
@@ -147,7 +147,7 @@ __emutls_get_address (struct __emutls_object *obj)
if (offset == 0)
{
offset = ++emutls_size;
- obj->loc.offset = offset;
+ __atomic_store_n (&obj->loc.offset, offset, __ATOMIC_RELEASE);
}
__gthread_mutex_unlock (&emutls_mutex);
}
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index cfddafe90f7..a9c38c8102b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+2012-10-12 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR libfortran/54736
+ Backport from trunk
+ * runtime/environ.c (search_unit): Correct logic
+ for binary search.
+ (mark_single): Fix index errors.
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index 6bd88865d89..a7bda45ce80 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -446,21 +446,35 @@ search_unit (int unit, int *ip)
{
int low, high, mid;
- low = -1;
- high = n_elist;
- while (high - low > 1)
+ if (n_elist == 0)
+ {
+ *ip = 0;
+ return 0;
+ }
+
+ low = 0;
+ high = n_elist - 1;
+
+ do
{
mid = (low + high) / 2;
- if (unit <= elist[mid].unit)
- high = mid;
+ if (unit == elist[mid].unit)
+ {
+ *ip = mid;
+ return 1;
+ }
+ else if (unit > elist[mid].unit)
+ low = mid + 1;
else
- low = mid;
- }
- *ip = high;
- if (elist[high].unit == unit)
- return 1;
+ high = mid - 1;
+ } while (low <= high);
+
+ if (unit > elist[mid].unit)
+ *ip = mid + 1;
else
- return 0;
+ *ip = mid;
+
+ return 0;
}
/* This matches a keyword. If it is found, return the token supplied,
@@ -575,13 +589,13 @@ mark_single (int unit)
}
if (search_unit (unit, &i))
{
- elist[unit].conv = endian;
+ elist[i].conv = endian;
}
else
{
- for (j=n_elist; j>=i; j--)
+ for (j=n_elist-1; j>=i; j--)
elist[j+1] = elist[j];
-
+
n_elist += 1;
elist[i].unit = unit;
elist[i].conv = endian;
diff --git a/libgo/go/reflect/type.go b/libgo/go/reflect/type.go
index 93021bae263..f2675c5784c 100644
--- a/libgo/go/reflect/type.go
+++ b/libgo/go/reflect/type.go
@@ -1230,8 +1230,19 @@ func directlyAssignable(T, V *commonType) bool {
for i := range t.fields {
tf := &t.fields[i]
vf := &v.fields[i]
- if tf.name != vf.name || tf.pkgPath != vf.pkgPath ||
- tf.typ != vf.typ || tf.tag != vf.tag || tf.offset != vf.offset {
+ if tf.name != vf.name && (tf.name == nil || vf.name == nil || *tf.name != *vf.name) {
+ return false
+ }
+ if tf.pkgPath != vf.pkgPath && (tf.pkgPath == nil || vf.pkgPath == nil || *tf.pkgPath != *vf.pkgPath) {
+ return false
+ }
+ if tf.typ != vf.typ {
+ return false
+ }
+ if tf.tag != vf.tag && (tf.tag == nil || vf.tag == nil || *tf.tag != *vf.tag) {
+ return false
+ }
+ if tf.offset != vf.offset {
return false
}
}
diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go
index b25e5c73d1a..5d0890016ed 100644
--- a/libgo/go/reflect/value.go
+++ b/libgo/go/reflect/value.go
@@ -841,7 +841,7 @@ func valueInterface(v Value, safe bool) interface{} {
eface.typ = v.typ.runtimeType()
eface.word = v.iword()
- if v.flag&flagIndir != 0 && v.typ.size > ptrSize {
+ if v.flag&flagIndir != 0 && v.kind() != Ptr && v.kind() != UnsafePointer {
// eface.word is a pointer to the actual data,
// which might be changed. We need to return
// a pointer to unchanging data, so make a copy.
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 8d7da192514..23164042ed9 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -310,11 +310,13 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
var lroff _loff_t
var plroff *_loff_t
if roff != nil {
+ lroff = _loff_t(*roff)
plroff = &lroff
}
var lwoff _loff_t
var plwoff *_loff_t
if woff != nil {
+ lwoff = _loff_t(*woff)
plwoff = &lwoff
}
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
diff --git a/libgo/go/syscall/socket.go b/libgo/go/syscall/socket.go
index 973759086ce..d11d6cd7534 100644
--- a/libgo/go/syscall/socket.go
+++ b/libgo/go/syscall/socket.go
@@ -87,12 +87,16 @@ func (sa *SockaddrUnix) sockaddr() (*RawSockaddrAny, Socklen_t, error) {
for i := 0; i < n; i++ {
sa.raw.Path[i] = int8(name[i])
}
+ // length is family (uint16), name, NUL.
+ sl := 2 + Socklen_t(n) + 1
if sa.raw.Path[0] == '@' {
sa.raw.Path[0] = 0
+ // Don't count trailing NUL for abstract address.
+ sl--
}
// length is family (uint16), name, NUL.
- return (*RawSockaddrAny)(unsafe.Pointer(&sa.raw)), 2 + Socklen_t(n) + 1, nil
+ return (*RawSockaddrAny)(unsafe.Pointer(&sa.raw)), sl, nil
}
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
diff --git a/libgo/go/syscall/socket_linux.go b/libgo/go/syscall/socket_linux.go
index 42ab2185084..224ca55ae21 100644
--- a/libgo/go/syscall/socket_linux.go
+++ b/libgo/go/syscall/socket_linux.go
@@ -103,7 +103,7 @@ func (sa *RawSockaddrUnix) getLen() (int, error) {
// to be uninterpreted fixed-size binary blobs--but
// everyone uses this convention.
n := 0
- for n < len(sa.Path) - 3 && sa.Path[n] != 0 {
+ for n < len(sa.Path) && sa.Path[n] != 0 {
n++
}
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 315d60cc39d..606a46324ff 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -168,6 +168,12 @@ enum {
#ifdef TIOCGWINSZ
TIOCGWINSZ_val = TIOCGWINSZ,
#endif
+#ifdef TIOCNOTTY
+ TIOCNOTTY_val = TIOCNOTTY,
+#endif
+#ifdef TIOCSCTTY
+ TIOCSCTTY_val = TIOCSCTTY,
+#endif
};
EOF
@@ -225,6 +231,16 @@ done
grep '^const _SIG[^_]' gen-sysinfo.go | \
grep -v '^const _SIGEV_' | \
sed -e 's/^\(const \)_\(SIG[^= ]*\)\(.*\)$/\1\2 = Signal(_\2)/' >> ${OUT}
+if ! grep '^const SIGPOLL ' ${OUT} >/dev/null 2>&1; then
+ if grep '^const SIGIO ' ${OUT} > /dev/null 2>&1; then
+ echo "const SIGPOLL = SIGIO" >> ${OUT}
+ fi
+fi
+if ! grep '^const SIGCLD ' ${OUT} >/dev/null 2>&1; then
+ if grep '^const SIGCHLD ' ${OUT} >/dev/null 2>&1; then
+ echo "const SIGCLD = SIGCHLD" >> ${OUT}
+ fi
+fi
# The syscall numbers. We force the names to upper case.
grep '^const _SYS_' gen-sysinfo.go | \
@@ -704,6 +720,16 @@ if ! grep '^const TIOCGWINSZ' ${OUT} >/dev/null 2>&1; then
echo 'const TIOCGWINSZ = _TIOCGWINSZ_val' >> ${OUT}
fi
fi
+if ! grep '^const TIOCNOTTY' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCNOTTY_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCNOTTY = _TIOCNOTTY_val' >> ${OUT}
+ fi
+fi
+if ! grep '^const TIOCSCTTY' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCSCTTY_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT}
+ fi
+fi
# The ioctl flags for terminal control
grep '^const _TC[GS]ET' gen-sysinfo.go | \
diff --git a/libgo/runtime/print.c b/libgo/runtime/print.c
index 5a8e47e5373..fcf57ea4144 100644
--- a/libgo/runtime/print.c
+++ b/libgo/runtime/print.c
@@ -17,7 +17,10 @@ gwrite(const void *v, int32 n)
G* g = runtime_g();
if(g == nil || g->writebuf == nil) {
- runtime_write(2, v, n);
+ // Avoid -D_FORTIFY_SOURCE problems.
+ int rv __attribute__((unused));
+
+ rv = runtime_write(2, v, n);
return;
}
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 11845a9bd12..25a5994469f 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/55411
+ * team.c (gomp_free_thread): Decrease gomp_managed_threads
+ if pool had any threads_used.
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
diff --git a/libgomp/team.c b/libgomp/team.c
index 633902ca567..110bd47116b 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011
+/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
@@ -232,6 +232,15 @@ gomp_free_thread (void *arg __attribute__((unused)))
gomp_barrier_wait (&pool->threads_dock);
/* Now it is safe to destroy the barrier and free the pool. */
gomp_barrier_destroy (&pool->threads_dock);
+
+#ifdef HAVE_SYNC_BUILTINS
+ __sync_fetch_and_add (&gomp_managed_threads,
+ 1L - pool->threads_used);
+#else
+ gomp_mutex_lock (&gomp_remaining_threads_lock);
+ gomp_managed_threads -= pool->threads_used - 1L;
+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
+#endif
}
free (pool->threads);
if (pool->last_team)
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4652d5c53c4..ecf623bfed4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,160 @@
+2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR libstdc++/55503
+ * testsuite/30_threads/condition_variable/members/53841.cc: Add
+ hppa*-hp-hpux11* to -pthread dg-options.
+
+2012-11-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/55413
+ * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Initialize
+ __bbegin_bkt and __prev_bkt to avoid uninitialized warnings.
+ * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
+ dg-error line number.
+
+2012-11-15 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/53841
+ * include/std/condition_variable (condition_variable::wait_until):
+ Handle clocks with higher resolution than __clock_t.
+ * testsuite/30_threads/condition_variable/members/53841.cc: New.
+
+2012-11-14 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/55320
+ * include/std/functional (function::function(F)): Set _M_manager after
+ operations that could throw.
+ (_Function_base::_Ref_manager::_M_init_functor): Use addressof.
+ * include/tr1/functional
+ (_Function_base::_Ref_manager::_M_init_functor): Use addressof.
+ (_Function_base::_Base_manager::_M_get_pointer): Likewise.
+ * testsuite/20_util/function/cons/55320.cc: New.
+ * testsuite/20_util/function/cons/addressof.cc: New.
+ * testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.
+ * testsuite/tr1/3_function_objects/function/10.cc: New.
+
+2012-11-12 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/future (atomic_future): Remove declaration of
+ non-standard name.
+
+2012-11-08 François Dumont <fdumont@gcc.gnu.org>
+
+ PR libstdc++/54075
+ * include/bits/hashtable.h (_Hashtable<>::rehash): Reset hash
+ policy state if no rehash.
+ * testsuite/23_containers/unordered_set/modifiers/reserve.cc
+ (test02): New.
+
+2012-11-08 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/profile/iterator_tracker.h (operator++): Fix returning
+ dangling reference.
+ (operator--): Likewise.
+
+2012-11-06 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/20_util/shared_ptr/cons/55123.cc: Remove duplicate
+ include.
+
+2012-11-06 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/*: Fix copying permission statements.
+
+2012-11-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/28811
+ PR libstdc++/54482
+ * configure.ac (glibcxx_lt_pic_flag,
+ glibcxx_compiler_pic_flag,
+ glibcxx_compiler_shared_flag): New. Use them.
+ (lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above.
+ (pic_mode): Set to default.
+ (PIC_CXXFLAGS): Remove.
+ * Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment.
+ * libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and
+ glibcxx_compiler_shared_flag. Comment.
+ * src/c++11/Makefile.am: Same.
+ * src/c++98/Makefile.am: Same.
+ * src/Makefile.am: Use glibcxx_compiler_pic_flag.
+
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Same.
+ * configure: Same.
+ * doc/Makefile.in: Same.
+ * include/Makefile.in: Same.
+ * libsupc++/Makefile.in: Same.
+ * po/Makefile.in: Same.
+ * python/Makefile.in: Same.
+ * src/Makefile.in: Same.
+ * src/c++11/Makefile.in: Same.
+ * src/c++98/Makefile.in: Same.
+ * testsuite/Makefile.in: Same.
+
+ * src/c++11/compatibility-atomic-c++0x.cc: Use
+ _GLIBCXX_SHARED instead of PIC to designate shared-only
+ code blocks.
+ * src/c++11/compatibility-c++0x.cc: Same.
+ * src/c++11/compatibility-thread-c++0x.cc: Same.
+ * src/c++98/compatibility-list-2.cc: Same.
+ * src/c++98/compatibility.cc: : Same.
+
+ * testsuite/17_intro/shared_with_static_deps.cc: New.
+
+ * doc/xml/manual/build_hacking.xml: Separate configure from
+ make/build issues, add build details.
+
+2012-11-05 Benjamin Kosnik <bkoz@redhat.com>
+ Oleg Smolsky <oleg@smolsky.net>
+
+ PR libstdc++/55028
+ * config/abi/pre/gnu-versioned-namespace.ver: Add symbols.
+ * testsuite/23_containers/unordered_multimap/insert/55028-debug.cc: New.
+
+2012-11-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/55215
+ * include/bits/random.tcc (mersenne_twister_engine<>::seed(_Sseq&)):
+ Assign state_size to _M_p.
+ * testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc:
+ New.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc:
+ Likewise.
+ * testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc:
+ Likewise.
+ * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
+ 55215.cc: Likewise.
+ * testsuite/26_numerics/random/discard_block_engine/cons/55215.cc:
+ Likewise.
+ * testsuite/26_numerics/random/linear_congruential_engine/cons/
+ 55215.cc: Likewise.
+
+2012-11-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/55169
+ * include/bits/random.h: Remove all uses of param().
+
+2012-11-01 Haakan Younes <hyounes@google.com>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/55047
+ * include/bits/random.h (exponential_distribution<>::operator):
+ Fix formula to std::log(result_type(1) - __aurng()).
+ * include/bits/random.tcc: Likewise, everywhere.
+
+2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/55123
+ * include/bits/shared_ptr_base.h (__shared_count::_S_create_from_up):
+ Do not instantiate allocator with element_type.
+ * testsuite/20_util/shared_ptr/cons/55123.cc: New.
+
+2012-10-10 Andrew MacLeod <amacleod@redhat.com>
+
+ PR libstdc++/54861
+ * include/bits/atomic_base.h (atomic_signal_fence): Call
+ __atomic_signal_fence instead of __atomic_thread_fence.
+
2012-09-20 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/54102, part 2
diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am
index 76ff04396ea..8be4f6c3c43 100644
--- a/libstdc++-v3/Makefile.am
+++ b/libstdc++-v3/Makefile.am
@@ -152,8 +152,6 @@ AM_MAKEFLAGS = \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
- "PICFLAG=$(PICFLAG)" \
- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 5089d0a63d9..afc698fea1e 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -188,7 +188,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -236,7 +235,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
@@ -353,8 +355,6 @@ AM_MAKEFLAGS = \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
- "PICFLAG=$(PICFLAG)" \
- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
index e7e91624759..bc90e0706fa 100644
--- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
@@ -131,6 +131,14 @@ GLIBCXX_7.0 {
_ZNK11__gnu_debug16_Error_formatter8_M_error*;
_ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv;
+ # __gnu_debug::_Safe_unordered_container_base
+ # __gnu_debug::_Safe_local_iterator_base
+ _ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0_;
+ _ZN11__gnu_debug30_Safe_unordered_container_base13_M_detach_allEv;
+ _ZN11__gnu_debug25_Safe_local_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb;
+ _ZN11__gnu_debug25_Safe_local_iterator_base9_M_detachEv;
+
+
# parallel mode
_ZN14__gnu_parallel9_Settings3getEv;
_ZN14__gnu_parallel9_Settings3setERS0_;
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index b6a553fb517..a317514cb2d 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -602,7 +602,6 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
-PIC_CXXFLAGS
WARN_FLAGS
OPTIMIZE_CXXFLAGS
TOPLEVEL_INCLUDES
@@ -713,6 +712,9 @@ GLIBCXX_BUILD_PCH_FALSE
GLIBCXX_BUILD_PCH_TRUE
GLIBCXX_HOSTED_FALSE
GLIBCXX_HOSTED_TRUE
+glibcxx_compiler_shared_flag
+glibcxx_compiler_pic_flag
+glibcxx_lt_pic_flag
enable_static
enable_shared
lt_host_flags
@@ -5280,6 +5282,7 @@ $as_echo "$as_me: OS config directory is $os_include_dir" >&6;}
+# Libtool setup.
if test "x${with_newlib}" != "xyes"; then
enable_dlopen=yes
@@ -11512,7 +11515,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11515 "configure"
+#line 11518 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11618,7 +11621,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11621 "configure"
+#line 11624 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14904,6 +14907,38 @@ esac
+# libtool variables for C++ shared and position-independent compiles.
+#
+# Use glibcxx_lt_pic_flag to designate the automake variable
+# used to encapsulate the default libtool approach to creating objects
+# with position-independent code. Default: -prefer-pic.
+#
+# Use glibcxx_compiler_shared_flag to designate a compile-time flags for
+# creating shared objects. Default: -D_GLIBCXX_SHARED.
+#
+# Use glibcxx_compiler_pic_flag to designate a compile-time flags for
+# creating position-independent objects. This varies with the target
+# hardware and operating system, but is often: -DPIC -fPIC.
+if test "$enable_shared" = yes; then
+ glibcxx_lt_pic_flag="-prefer-pic"
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
+ glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
+
+else
+ glibcxx_lt_pic_flag=
+ glibcxx_compiler_pic_flag=
+ glibcxx_compiler_shared_flag=
+fi
+
+
+
+
+# Override the libtool's pic_flag and pic_mode.
+# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
+# NB: this impacts --with-pic and --without-pic.
+lt_prog_compiler_pic_CXX="$glibcxx_compiler_pic_flag $glibcxx_compiler_shared_flag"
+pic_mode='default'
+
# Eliminate -lstdc++ addition to postdeps for cross compiles.
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
@@ -14976,7 +15011,7 @@ fi
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 14979 "configure"
+#line 15014 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15311,7 +15346,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15314 "configure"
+#line 15349 "configure"
int main()
{
typedef bool atomic_type;
@@ -15346,7 +15381,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15349 "configure"
+#line 15384 "configure"
int main()
{
typedef short atomic_type;
@@ -15381,7 +15416,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15384 "configure"
+#line 15419 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15417,7 +15452,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15420 "configure"
+#line 15455 "configure"
int main()
{
typedef long long atomic_type;
@@ -15496,7 +15531,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15499 "configure"
+#line 15534 "configure"
int main()
{
_Decimal32 d1;
@@ -15538,7 +15573,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15541 "configure"
+#line 15576 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -15572,7 +15607,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15575 "configure"
+#line 15610 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -66487,13 +66522,6 @@ $as_echo "$gxx_include_dir" >&6; }
-if test "$enable_shared" = yes; then
- PIC_CXXFLAGS="-prefer-pic"
-else
- PIC_CXXFLAGS=
-fi
-
-
ac_config_files="$ac_config_files Makefile"
ac_config_files="$ac_config_files scripts/testsuite_flags"
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 6a3db060508..ce1f6c48165 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -88,6 +88,7 @@ CXXFLAGS="$save_CXXFLAGS"
# up critical shell variables.
GLIBCXX_CONFIGURE
+# Libtool setup.
if test "x${with_newlib}" != "xyes"; then
AC_LIBTOOL_DLOPEN
fi
@@ -96,6 +97,38 @@ ACX_LT_HOST_FLAGS
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
+# libtool variables for C++ shared and position-independent compiles.
+#
+# Use glibcxx_lt_pic_flag to designate the automake variable
+# used to encapsulate the default libtool approach to creating objects
+# with position-independent code. Default: -prefer-pic.
+#
+# Use glibcxx_compiler_shared_flag to designate a compile-time flags for
+# creating shared objects. Default: -D_GLIBCXX_SHARED.
+#
+# Use glibcxx_compiler_pic_flag to designate a compile-time flags for
+# creating position-independent objects. This varies with the target
+# hardware and operating system, but is often: -DPIC -fPIC.
+if test "$enable_shared" = yes; then
+ glibcxx_lt_pic_flag="-prefer-pic"
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
+ glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
+
+else
+ glibcxx_lt_pic_flag=
+ glibcxx_compiler_pic_flag=
+ glibcxx_compiler_shared_flag=
+fi
+AC_SUBST(glibcxx_lt_pic_flag)
+AC_SUBST(glibcxx_compiler_pic_flag)
+AC_SUBST(glibcxx_compiler_shared_flag)
+
+# Override the libtool's pic_flag and pic_mode.
+# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
+# NB: this impacts --with-pic and --without-pic.
+lt_prog_compiler_pic_CXX="$glibcxx_compiler_pic_flag $glibcxx_compiler_shared_flag"
+pic_mode='default'
+
# Eliminate -lstdc++ addition to postdeps for cross compiles.
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
@@ -421,13 +454,6 @@ GLIBCXX_EXPORT_INSTALL_INFO
GLIBCXX_EXPORT_INCLUDES
GLIBCXX_EXPORT_FLAGS
-if test "$enable_shared" = yes; then
- PIC_CXXFLAGS="-prefer-pic"
-else
- PIC_CXXFLAGS=
-fi
-AC_SUBST(PIC_CXXFLAGS)
-
dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
dnl which can all be called multiple times as needed, plus one (different)
dnl AC_OUTPUT macro. This one lists the files to be created:
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index 58407ba7278..db265e962c2 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -210,7 +209,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
diff --git a/libstdc++-v3/doc/xml/manual/build_hacking.xml b/libstdc++-v3/doc/xml/manual/build_hacking.xml
index daac8c0e2f0..771d005e71b 100644
--- a/libstdc++-v3/doc/xml/manual/build_hacking.xml
+++ b/libstdc++-v3/doc/xml/manual/build_hacking.xml
@@ -8,7 +8,13 @@
C++
</keyword>
<keyword>
- BUILD_HACKING
+ build
+ </keyword>
+ <keyword>
+ configure
+ </keyword>
+ <keyword>
+ hacking
</keyword>
<keyword>
version
@@ -38,7 +44,50 @@
</para>
</section>
-<section xml:id="build_hacking.map"><info><title>Overview: What Comes from Where</title></info>
+<section xml:id="build_hacking.overview">
+<info><title>Overview</title></info>
+
+<section xml:id="build_hacking.overview.basic">
+<info><title>General Process</title></info>
+
+<para>
+ The configure process begins the act of building libstdc++, and is
+ started via:
+</para>
+
+<screen>
+<computeroutput>
+configure
+</computeroutput>
+</screen>
+
+<para>
+The <filename>configure</filename> file is a script generated (via
+<command>autoconf</command>) from the file
+<filename>configure.ac</filename>.
+</para>
+
+
+<para>
+ After the configure process is complete,
+</para>
+
+<screen>
+<computeroutput>
+make all
+</computeroutput>
+</screen>
+
+<para>
+in the build directory starts the build process. The <literal>all</literal> target comes from the <filename>Makefile</filename> file, which is generated via <command>configure</command> from the <filename>Makefile.in</filename> file, which is in turn generated (via
+<command>automake</command>) from the file
+<filename>Makefile.am</filename>.
+</para>
+
+</section>
+
+
+<section xml:id="build_hacking.overview.map"><info><title>What Comes from Where</title></info>
<figure>
@@ -57,19 +106,19 @@
</figure>
<para>
- Regenerate all generated files by using the command sequence
- <code>"autoreconf"</code> at the top level of the libstdc++ source
- directory. The following will also work, but is much more complex:
- <code>"aclocal-1.11 &amp;&amp; autoconf-2.64 &amp;&amp;
- autoheader-2.64 &amp;&amp; automake-1.11"</code> The version
- numbers may be absent entirely or otherwise vary depending on
- <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/prerequisites.html">the
- current requirements</link> and your vendor's choice of
- installation names.
+ Regenerate all generated files by using the command
+ <code>autoreconf</code> at the top level of the libstdc++ source
+ directory.
</para>
</section>
-<section xml:id="build_hacking.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info>
+</section> <!-- overview -->
+
+
+<section xml:id="build_hacking.configure">
+<info><title>Configure</title></info>
+
+<section xml:id="build_hacking.configure.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info>
<para>
@@ -101,7 +150,7 @@
</para>
</section>
-<section xml:id="build_hacking.conventions"><info><title>Coding and Commenting Conventions</title></info>
+<section xml:id="build_hacking.configure.conventions"><info><title>Coding and Commenting Conventions</title></info>
<para>
@@ -126,7 +175,7 @@
</para>
</section>
-<section xml:id="build_hacking.acinclude"><info><title>The acinclude.m4 layout</title></info>
+<section xml:id="build_hacking.configure.acinclude"><info><title>The acinclude.m4 layout</title></info>
<para>
The nice thing about acinclude.m4/aclocal.m4 is that macros aren't
@@ -217,7 +266,7 @@
</section>
-<section xml:id="build_hacking.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info>
+<section xml:id="build_hacking.configure.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info>
<para>
@@ -351,5 +400,86 @@
</para>
</section>
+</section> <!-- configure -->
+
+<section xml:id="build_hacking.make"><info><title>Make</title></info>
+
+ <para>
+ The build process has to make all of object files needed for
+ static or shared libraries, but first it has to generate some
+ include files. The general order is as follows:
+ </para>
+
+<orderedlist>
+ <listitem>
+ <para>
+ make include files, make pre-compiled headers
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ make libsupc++
+ </para>
+ <para>
+ Generates a libtool convenience library,
+ <filename>libsupc++convenience</filename> with language-support
+ routines. Also generates a freestanding static library,
+ <filename>libsupc++.a</filename>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ make src
+ </para>
+ <para>
+ Generates two convenience libraries, one for C++98 and one for
+ C++11, various compability files for shared and static
+ libraries, and then collects all the generated bits and creates
+ the final libstdc++ libraries.
+ </para>
+<orderedlist>
+ <listitem>
+ <para>
+ make src/c++98
+ </para>
+ <para>
+ Generates a libtool convenience library,
+ <filename>libc++98convenience</filename> with language-support
+ routines. Uses the <literal>-std=gnu++98</literal> dialect.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ make src/c++11
+ </para>
+ <para>
+ Generates a libtool convenience library,
+ <filename>libc++11convenience</filename> with language-support
+ routines. Uses the <literal>-std=gnu++11</literal> dialect.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ make src
+ </para>
+ <para>
+ Generates needed compatibility objects for shared and static
+ libraries. Shared-only code is seggregated at compile-time via
+ the macro <literal>_GLIBCXX_SHARED</literal>.
+ </para>
+
+ <para>
+ Then, collects all the generated convenience libraries, adds in
+ any required compatibility objects, and creates the final shared
+ and static libraries: <filename>libstdc++.so</filename> and
+ <filename>libstdc++.a</filename>.
+ </para>
+
+ </listitem>
+</orderedlist>
+ </listitem>
+</orderedlist>
+
+</section> <!-- make -->
</section>
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 23caf106192..b931fad4b01 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index 9d5f4eb6ff0..bd14e35cd5a 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline void
atomic_signal_fence(memory_order __m) noexcept
- { __atomic_thread_fence(__m); }
+ { __atomic_signal_fence(__m); }
/// kill_dependency
template<typename _Tp>
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 929f0bb790a..b58189f9685 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -1,7 +1,6 @@
// hashtable.h header -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
-// Free Software Foundation, Inc.
+// Copyright (C) 2007-2012 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
@@ -1597,6 +1596,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// level.
_M_rehash_policy._M_prev_resize = 0;
}
+ else
+ // No rehash, restore previous state to keep a consistent state.
+ _M_rehash_policy._M_reset(__saved_state);
}
template<typename _Key, typename _Value,
@@ -1634,7 +1636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Bucket* __new_buckets = _M_allocate_buckets(__n);
_Node* __p = _M_begin();
_M_before_begin._M_nxt = nullptr;
- std::size_t __bbegin_bkt;
+ std::size_t __bbegin_bkt = 0;
while (__p)
{
_Node* __next = __p->_M_next();
@@ -1675,8 +1677,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Node* __p = _M_begin();
_M_before_begin._M_nxt = nullptr;
- std::size_t __bbegin_bkt;
- std::size_t __prev_bkt;
+ std::size_t __bbegin_bkt = 0;
+ std::size_t __prev_bkt = 0;
_Node* __prev_p = nullptr;
bool __check_bucket = false;
@@ -1704,8 +1706,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
if (__check_bucket)
{
- // Check if we shall update the next bucket because of insertions
- // into __prev_bkt bucket.
+ // Check if we shall update the next bucket because of
+ // insertions into __prev_bkt bucket.
if (__prev_p->_M_nxt)
{
std::size_t __next_bkt
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index aa4ce3e8209..1e8caa023b3 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -1,6 +1,6 @@
// random number generation -*- C++ -*-
-// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2009-2012 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
@@ -1719,28 +1719,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p);
+ /**
+ * @brief Return true if two uniform integer distributions have
+ * the same parameters.
+ */
+ friend bool
+ operator==(const uniform_int_distribution& __d1,
+ const uniform_int_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ private:
param_type _M_param;
};
/**
* @brief Return true if two uniform integer distributions have
- * the same parameters.
- */
- template<typename _IntType>
- inline bool
- operator==(const std::uniform_int_distribution<_IntType>& __d1,
- const std::uniform_int_distribution<_IntType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
- * @brief Return true if two uniform integer distributions have
* different parameters.
*/
template<typename _IntType>
@@ -1894,7 +1894,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -1906,22 +1906,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return (__aurng() * (__p.b() - __p.a())) + __p.a();
}
+ /**
+ * @brief Return true if two uniform real distributions have
+ * the same parameters.
+ */
+ friend bool
+ operator==(const uniform_real_distribution& __d1,
+ const uniform_real_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
* @brief Return true if two uniform real distributions have
- * the same parameters.
- */
- template<typename _IntType>
- inline bool
- operator==(const std::uniform_real_distribution<_IntType>& __d1,
- const std::uniform_real_distribution<_IntType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
- * @brief Return true if two uniform real distributions have
* different parameters.
*/
template<typename _IntType>
@@ -2088,7 +2087,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -2261,7 +2260,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -2277,7 +2276,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const lognormal_distribution& __d1,
const lognormal_distribution& __d2)
- { return (__d1.param() == __d2.param()
+ { return (__d1._M_param == __d2._M_param
&& __d1._M_nd == __d2._M_nd); }
/**
@@ -2454,7 +2453,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -2469,7 +2468,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const gamma_distribution& __d1,
const gamma_distribution& __d2)
- { return (__d1.param() == __d2.param()
+ { return (__d1._M_param == __d2._M_param
&& __d1._M_nd == __d2._M_nd); }
/**
@@ -2633,7 +2632,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const chi_squared_distribution& __d1,
const chi_squared_distribution& __d2)
- { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+ { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
/**
* @brief Inserts a %chi_squared_distribution random number distribution
@@ -2788,29 +2787,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p);
+ /**
+ * @brief Return true if two Cauchy distributions have
+ * the same parameters.
+ */
+ friend bool
+ operator==(const cauchy_distribution& __d1,
+ const cauchy_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
* @brief Return true if two Cauchy distributions have
- * the same parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::cauchy_distribution<_RealType>& __d1,
- const std::cauchy_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
- * @brief Return true if two Cauchy distributions have
* different parameters.
*/
template<typename _RealType>
@@ -2985,7 +2983,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const fisher_f_distribution& __d1,
const fisher_f_distribution& __d2)
- { return (__d1.param() == __d2.param()
+ { return (__d1._M_param == __d2._M_param
&& __d1._M_gd_x == __d2._M_gd_x
&& __d1._M_gd_y == __d2._M_gd_y); }
@@ -3158,7 +3156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const student_t_distribution& __d1,
const student_t_distribution& __d2)
- { return (__d1.param() == __d2.param()
+ { return (__d1._M_param == __d2._M_param
&& __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
/**
@@ -3318,7 +3316,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -3333,21 +3331,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return false;
}
+ /**
+ * @brief Return true if two Bernoulli distributions have
+ * the same parameters.
+ */
+ friend bool
+ operator==(const bernoulli_distribution& __d1,
+ const bernoulli_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
* @brief Return true if two Bernoulli distributions have
- * the same parameters.
- */
- inline bool
- operator==(const std::bernoulli_distribution& __d1,
- const std::bernoulli_distribution& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
- * @brief Return true if two Bernoulli distributions have
* different parameters.
*/
inline bool
@@ -3518,7 +3516,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -3534,9 +3532,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator==(const binomial_distribution& __d1,
const binomial_distribution& __d2)
#ifdef _GLIBCXX_USE_C99_MATH_TR1
- { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+ { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
#else
- { return __d1.param() == __d2.param(); }
+ { return __d1._M_param == __d2._M_param; }
#endif
/**
@@ -3701,29 +3699,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p);
+ /**
+ * @brief Return true if two geometric distributions have
+ * the same parameters.
+ */
+ friend bool
+ operator==(const geometric_distribution& __d1,
+ const geometric_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
* @brief Return true if two geometric distributions have
- * the same parameters.
- */
- template<typename _IntType>
- inline bool
- operator==(const std::geometric_distribution<_IntType>& __d1,
- const std::geometric_distribution<_IntType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
- * @brief Return true if two geometric distributions have
* different parameters.
*/
template<typename _IntType>
@@ -3889,7 +3886,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend bool
operator==(const negative_binomial_distribution& __d1,
const negative_binomial_distribution& __d2)
- { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+ { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; }
/**
* @brief Inserts a %negative_binomial_distribution random
@@ -4057,7 +4054,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -4073,9 +4070,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator==(const poisson_distribution& __d1,
const poisson_distribution& __d2)
#ifdef _GLIBCXX_USE_C99_MATH_TR1
- { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+ { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; }
#else
- { return __d1.param() == __d2.param(); }
+ { return __d1._M_param == __d2._M_param; }
#endif
/**
@@ -4238,7 +4235,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -4247,24 +4244,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
__aurng(__urng);
- return -std::log(__aurng()) / __p.lambda();
+ return -std::log(result_type(1) - __aurng()) / __p.lambda();
}
+ /**
+ * @brief Return true if two exponential distributions have the same
+ * parameters.
+ */
+ friend bool
+ operator==(const exponential_distribution& __d1,
+ const exponential_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
- * @brief Return true if two exponential distributions have the same
- * parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::exponential_distribution<_RealType>& __d1,
- const std::exponential_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two exponential distributions have different
* parameters.
*/
@@ -4418,28 +4414,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p);
+ /**
+ * @brief Return true if two Weibull distributions have the same
+ * parameters.
+ */
+ friend bool
+ operator==(const weibull_distribution& __d1,
+ const weibull_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
- * @brief Return true if two Weibull distributions have the same
- * parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::weibull_distribution<_RealType>& __d1,
- const std::weibull_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two Weibull distributions have different
* parameters.
*/
@@ -4593,28 +4588,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __p);
+ /**
+ * @brief Return true if two extreme value distributions have the same
+ * parameters.
+ */
+ friend bool
+ operator==(const extreme_value_distribution& __d1,
+ const extreme_value_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
private:
param_type _M_param;
};
/**
- * @brief Return true if two extreme value distributions have the same
- * parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::extreme_value_distribution<_RealType>& __d1,
- const std::extreme_value_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two extreme value distributions have different
* parameters.
*/
@@ -4794,7 +4788,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -4802,6 +4796,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const param_type& __p);
/**
+ * @brief Return true if two discrete distributions have the same
+ * parameters.
+ */
+ friend bool
+ operator==(const discrete_distribution& __d1,
+ const discrete_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ /**
* @brief Inserts a %discrete_distribution random number distribution
* @p __x into the output stream @p __os.
*
@@ -4837,16 +4840,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/**
- * @brief Return true if two discrete distributions have the same
- * parameters.
- */
- template<typename _IntType>
- inline bool
- operator==(const std::discrete_distribution<_IntType>& __d1,
- const std::discrete_distribution<_IntType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two discrete distributions have different
* parameters.
*/
@@ -5032,7 +5025,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -5040,6 +5033,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const param_type& __p);
/**
+ * @brief Return true if two piecewise constant distributions have the
+ * same parameters.
+ */
+ friend bool
+ operator==(const piecewise_constant_distribution& __d1,
+ const piecewise_constant_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ /**
* @brief Inserts a %piecewise_constan_distribution random
* number distribution @p __x into the output stream @p __os.
*
@@ -5076,16 +5078,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/**
- * @brief Return true if two piecewise constant distributions have the
- * same parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::piecewise_constant_distribution<_RealType>& __d1,
- const std::piecewise_constant_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two piecewise constant distributions have
* different parameters.
*/
@@ -5274,7 +5266,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _UniformRandomNumberGenerator>
result_type
operator()(_UniformRandomNumberGenerator& __urng)
- { return this->operator()(__urng, this->param()); }
+ { return this->operator()(__urng, _M_param); }
template<typename _UniformRandomNumberGenerator>
result_type
@@ -5282,6 +5274,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const param_type& __p);
/**
+ * @brief Return true if two piecewise linear distributions have the
+ * same parameters.
+ */
+ friend bool
+ operator==(const piecewise_linear_distribution& __d1,
+ const piecewise_linear_distribution& __d2)
+ { return __d1._M_param == __d2._M_param; }
+
+ /**
* @brief Inserts a %piecewise_linear_distribution random number
* distribution @p __x into the output stream @p __os.
*
@@ -5318,16 +5319,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/**
- * @brief Return true if two piecewise linear distributions have the
- * same parameters.
- */
- template<typename _RealType>
- inline bool
- operator==(const std::piecewise_linear_distribution<_RealType>& __d1,
- const std::piecewise_linear_distribution<_RealType>& __d2)
- { return __d1.param() == __d2.param(); }
-
- /**
* @brief Return true if two piecewise linear distributions have
* different parameters.
*/
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index 5b90e5a6157..a182dfb838a 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -1,6 +1,6 @@
// random number generation (out of line) -*- C++ -*-
-// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2009-2012 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
@@ -401,6 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
if (__zero)
_M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value;
+ _M_p = state_size;
}
template<typename _UIntType, size_t __w,
@@ -1053,7 +1054,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
double __cand;
do
- __cand = std::floor(std::log(__aurng()) / __param._M_log_1_p);
+ __cand = std::floor(std::log(1.0 - __aurng()) / __param._M_log_1_p);
while (__cand >= __thr);
return result_type(__cand + __naf);
@@ -1258,7 +1259,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
do
{
const double __u = __c * __aurng();
- const double __e = -std::log(__aurng());
+ const double __e = -std::log(1.0 - __aurng());
double __w = 0.0;
@@ -1290,7 +1291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__x = 1;
else
{
- const double __v = -std::log(__aurng());
+ const double __v = -std::log(1.0 - __aurng());
const double __y = __param._M_d
+ __v * __2cx / __param._M_d;
__x = std::ceil(__y);
@@ -1434,7 +1435,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
do
{
- const double __e = -std::log(__aurng());
+ const double __e = -std::log(1.0 - __aurng());
__sum += __e / (__t - __x);
__x += 1;
}
@@ -1502,7 +1503,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__reject = __y >= __param._M_d1;
if (!__reject)
{
- const double __e = -std::log(__aurng());
+ const double __e = -std::log(1.0 - __aurng());
__x = std::floor(__y);
__v = -__e - __n * __n / 2 + __param._M_c;
}
@@ -1514,15 +1515,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__reject = __y >= __param._M_d2;
if (!__reject)
{
- const double __e = -std::log(__aurng());
+ const double __e = -std::log(1.0 - __aurng());
__x = std::floor(-__y);
__v = -__e - __n * __n / 2;
}
}
else if (__u <= __a123)
{
- const double __e1 = -std::log(__aurng());
- const double __e2 = -std::log(__aurng());
+ const double __e1 = -std::log(1.0 - __aurng());
+ const double __e2 = -std::log(1.0 - __aurng());
const double __y = __param._M_d1
+ 2 * __s1s * __e1 / __param._M_d1;
@@ -1533,8 +1534,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
else
{
- const double __e1 = -std::log(__aurng());
- const double __e2 = -std::log(__aurng());
+ const double __e1 = -std::log(1.0 - __aurng());
+ const double __e2 = -std::log(1.0 - __aurng());
const double __y = __param._M_d2
+ 2 * __s2s * __e1 / __param._M_d2;
@@ -2136,7 +2137,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
__aurng(__urng);
- return __p.b() * std::pow(-std::log(__aurng()),
+ return __p.b() * std::pow(-std::log(result_type(1) - __aurng()),
result_type(1) / __p.a());
}
@@ -2194,7 +2195,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
__detail::_Adaptor<_UniformRandomNumberGenerator, result_type>
__aurng(__urng);
- return __p.a() - __p.b() * std::log(-std::log(__aurng()));
+ return __p.a() - __p.b() * std::log(-std::log(result_type(1)
+ - __aurng()));
}
template<typename _RealType, typename _CharT, typename _Traits>
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 39449f1b4bb..0d60eeffa5b 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -621,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
{
- return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
+ return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<void>,
_Lp>(__r.get(), __r.get_deleter());
}
@@ -632,7 +632,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
typedef typename std::remove_reference<_Del>::type _Del1;
typedef std::reference_wrapper<_Del1> _Del2;
- return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
+ return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<void>,
_Lp>(__r.get(), std::ref(__r.get_deleter()));
}
diff --git a/libstdc++-v3/include/profile/iterator_tracker.h b/libstdc++-v3/include/profile/iterator_tracker.h
index 733429daad3..91f733cf757 100644
--- a/libstdc++-v3/include/profile/iterator_tracker.h
+++ b/libstdc++-v3/include/profile/iterator_tracker.h
@@ -93,7 +93,7 @@ namespace __profile
return *this;
}
- __iterator_tracker&
+ __iterator_tracker
operator++(int)
{
_M_ds->_M_profile_iterate();
@@ -110,7 +110,7 @@ namespace __profile
return *this;
}
- __iterator_tracker&
+ __iterator_tracker
operator--(int)
{
_M_ds->_M_profile_iterate(1);
diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable
index 0a85e1a3e20..60c72bacff0 100644
--- a/libstdc++-v3/include/std/condition_variable
+++ b/libstdc++-v3/include/std/condition_variable
@@ -107,8 +107,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// DR 887 - Sync unknown clock to known clock.
const typename _Clock::time_point __c_entry = _Clock::now();
const __clock_t::time_point __s_entry = __clock_t::now();
- const chrono::nanoseconds __delta = __atime - __c_entry;
- const __clock_t::time_point __s_atime = __s_entry + __delta;
+ const auto __delta = __atime - __c_entry;
+ const auto __s_atime = __s_entry + __delta;
return __wait_until_impl(__lock, __s_atime);
}
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 4be1bc793f3..782400b39c6 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -1,7 +1,7 @@
// <functional> -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-// 2011 Free Software Foundation, Inc.
+// 2011, 2012 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
@@ -1872,8 +1872,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
static void
_M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
{
- // TBD: Use address_of function instead.
- _Base::_M_init_functor(__functor, &__f.get());
+ _Base::_M_init_functor(__functor, std::__addressof(__f.get()));
}
};
@@ -2295,9 +2294,9 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
if (_My_handler::_M_not_empty_function(__f))
{
+ _My_handler::_M_init_functor(_M_functor, std::move(__f));
_M_invoker = &_My_handler::_M_invoke;
_M_manager = &_My_handler::_M_manager;
- _My_handler::_M_init_functor(_M_functor, std::move(__f));
}
}
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 22fd36a6fce..98c7b843812 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -113,9 +113,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Res>
class shared_future;
- template<typename _Res>
- class atomic_future;
-
template<typename _Signature>
class packaged_task;
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional
index ff2bd2a7134..ef1461b694c 100644
--- a/libstdc++-v3/include/tr1/functional
+++ b/libstdc++-v3/include/tr1/functional
@@ -1,6 +1,6 @@
// TR1 functional header -*- C++ -*-
-// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011
+// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -1616,7 +1616,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_get_pointer(const _Any_data& __source)
{
const _Functor* __ptr =
- __stored_locally? &__source._M_access<_Functor>()
+ __stored_locally? std::__addressof(__source._M_access<_Functor>())
/* have stored a pointer */ : __source._M_access<_Functor*>();
return const_cast<_Functor*>(__ptr);
}
@@ -1745,8 +1745,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static void
_M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
{
- // TBD: Use address_of function instead.
- _Base::_M_init_functor(__functor, &__f.get());
+ _Base::_M_init_functor(__functor, std::__addressof(__f.get()));
}
};
diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index 3ca2de1751e..34abc2cb8af 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -99,36 +99,6 @@ sources = \
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
-# AM_CXXFLAGS needs to be in each subdirectory so that it can be
-# modified in a per-library or per-sub-library way. Need to manually
-# set this option because CONFIG_CXXFLAGS has to be after
-# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it.
-AM_CXXFLAGS = \
- $(PIC_CXXFLAGS) \
- $(XTEMPLATE_FLAGS) \
- $(WARN_CXXFLAGS) \
- $(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS) \
- $($(@)_no_omit_frame_pointer)
-
-AM_MAKEFLAGS = \
- "gxx_include_dir=$(gxx_include_dir)"
-
-
-# Use special rules for pulling things out of libiberty. These
-# objects should be compiled with the "C" compiler, not the C++
-# compiler, and also should not use the C++ includes.
-C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
-C_COMPILE = \
- $(CC) $(DEFS) $(C_INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-# LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
- $(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
cp-demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
@@ -159,13 +129,37 @@ nested_exception.lo: nested_exception.cc
nested_exception.o: nested_exception.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
-# Libtool notes
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way. Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it.
+AM_CXXFLAGS = \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(XTEMPLATE_FLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
+AM_MAKEFLAGS = \
+ "gxx_include_dir=$(gxx_include_dir)"
+
+
+# Use special rules for pulling things out of libiberty. These
+# objects should be compiled with the "C" compiler, not the C++
+# compiler, and also should not use the C++ includes.
+C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
+C_COMPILE = \
+ $(CC) $(DEFS) $(C_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
+ $(CC) $(DEFS) $(C_INCLUDES) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+# Libtool notes
+
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -177,9 +171,18 @@ nested_exception.o: nested_exception.cc
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-#
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 1eee31f3461..a4f93aad9c5 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -220,7 +220,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -268,7 +267,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
@@ -414,7 +416,7 @@ libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion call for it.
AM_CXXFLAGS = \
- $(PIC_CXXFLAGS) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
@@ -436,17 +438,14 @@ C_COMPILE = \
# LTCOMPILE is copied from LTCXXCOMPILE below.
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
- $(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \
+ $(CC) $(DEFS) $(C_INCLUDES) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -458,9 +457,18 @@ LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=comp
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-#
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 4392d89d118..a3076505847 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index f83fac87a09..249d56f5e52 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -184,7 +184,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -232,7 +231,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index d1661552f41..b1dd12102fe 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -116,22 +116,41 @@ compatibility-thread-c++0x.lo: compatibility-thread-c++0x.cc
compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc
$(CXXCOMPILE) -std=gnu++11 -c $<
-# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# A note on compatibility and static libraries.
+#
+# static lib == linked against only this version, should not need compat
+# shared lib == linked against potentially all compat versions
+#
+# Thus, the shared libs have more compat symbols, which can be found
+# segregated in the sources with -D_GLIBCXX_SHARED.
+#
+# In the sub-directories of libsupc++, src/c++98, src/c++11, only
+# -prefer-pic objects are generated for the convenience libraries.
+#
+# In the main src directory, make shared and static objects just for
+# the compat libraries. Shared objects are compiled with -prefer-pic
+# -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are
+# compiled with -prefer-pic (ie, -fPIC but not -D_GLIBCXX_SHARED) and
+# the main src directory.
+#
+# Why are objects destined for libstdc++.a compiled with -fPIC? First,
+# because -fPIC is not harmful to use for objects destined for static
+# libraries. In addition, using -fPIC will allow the use of static
+# libstdc++.a in the creation of other C++ shared libraries.
+
+# AM_CXXFLAGS needs to be in each sub-directory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
+ $(glibcxx_compiler_pic_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -142,7 +161,19 @@ AM_CXXFLAGS = \
# can't decide which configuration to use, and it gives up. The
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
-# attempt to infer which configuration to use
+# attempt to infer which configuration to use.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index e0578a25fa7..b7f7324e5bf 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -213,7 +213,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -261,7 +260,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
@@ -374,23 +376,42 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
# Use special rules for parallel mode compilation.
PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
-# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# A note on compatibility and static libraries.
+#
+# static lib == linked against only this version, should not need compat
+# shared lib == linked against potentially all compat versions
+#
+# Thus, the shared libs have more compat symbols, which can be found
+# segregated in the sources with -D_GLIBCXX_SHARED.
+#
+# In the sub-directories of libsupc++, src/c++98, src/c++11, only
+# -prefer-pic objects are generated for the convenience libraries.
+#
+# In the main src directory, make shared and static objects just for
+# the compat libraries. Shared objects are compiled with -prefer-pic
+# -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are
+# compiled with -prefer-pic (ie, -fPIC but not -D_GLIBCXX_SHARED) and
+# the main src directory.
+#
+# Why are objects destined for libstdc++.a compiled with -fPIC? First,
+# because -fPIC is not harmful to use for objects destined for static
+# libraries. In addition, using -fPIC will allow the use of static
+# libstdc++.a in the creation of other C++ shared libraries.
+
+# AM_CXXFLAGS needs to be in each sub-directory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
+ $(glibcxx_compiler_pic_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -401,7 +422,19 @@ AM_CXXFLAGS = \
# can't decide which configuration to use, and it gives up. The
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
-# attempt to infer which configuration to use
+# attempt to infer which configuration to use.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am
index a035d4c8214..14a412711c6 100644
--- a/libstdc++-v3/src/c++11/Makefile.am
+++ b/libstdc++-v3/src/c++11/Makefile.am
@@ -68,7 +68,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
# as the occasion calls for it.
AM_CXXFLAGS = \
-std=gnu++11 \
- $(PIC_CXXFLAGS) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
$($(@)_no_omit_frame_pointer)
@@ -78,11 +78,7 @@ AM_MAKEFLAGS = \
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -94,8 +90,18 @@ AM_MAKEFLAGS = \
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index ab47a1e2a38..be91b30acf3 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -177,7 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -225,7 +224,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
@@ -331,7 +333,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
# as the occasion calls for it.
AM_CXXFLAGS = \
-std=gnu++11 \
- $(PIC_CXXFLAGS) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
$($(@)_no_omit_frame_pointer)
@@ -342,11 +344,7 @@ AM_MAKEFLAGS = \
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -358,8 +356,18 @@ AM_MAKEFLAGS = \
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
index 8ccad9330ed..3ad0b93974e 100644
--- a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
+++ b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
@@ -30,7 +30,7 @@
// XXX GLIBCXX_ABI Deprecated
// gcc-4.7.0
-#ifdef PIC
+#ifdef _GLIBCXX_SHARED
#define LOGSIZE 4
@@ -147,7 +147,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
// In the future, GLIBCXX_ABI > 6 should remove all uses of
// _GLIBCXX_*_SYMVER macros in this file.
-#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
diff --git a/libstdc++-v3/src/c++11/compatibility-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-c++0x.cc
index bd5dbe0ff06..306bad55faf 100644
--- a/libstdc++-v3/src/c++11/compatibility-c++0x.cc
+++ b/libstdc++-v3/src/c++11/compatibility-c++0x.cc
@@ -30,7 +30,7 @@
# error "compatibility-c++0x.cc must be compiled with -std=gnu++0x"
#endif
-#ifdef PIC
+#ifdef _GLIBCXX_SHARED
namespace std _GLIBCXX_VISIBILITY(default)
{
diff --git a/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
index e5c7eec419e..5e87b531923 100644
--- a/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
+++ b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
@@ -23,7 +23,7 @@
// <http://www.gnu.org/licenses/>.
#include <bits/c++config.h>
-#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
+#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED)
#define _GLIBCXX_ASYNC_ABI_COMPAT
#endif
@@ -40,7 +40,7 @@
// XXX GLIBCXX_ABI Deprecated
// gcc-4.6.0
// <future> export changes
-#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
@@ -57,7 +57,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx15future_categoryE, _ZSt15future_category, GLIB
// gcc-4.6.0
// <mutex> export changes
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
-#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
@@ -82,7 +82,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4.
// <future> export changes
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
&& (ATOMIC_INT_LOCK_FREE > 1)
-#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
+#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED)
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am
index 05767e9ff23..c153a59336d 100644
--- a/libstdc++-v3/src/c++98/Makefile.am
+++ b/libstdc++-v3/src/c++98/Makefile.am
@@ -172,7 +172,7 @@ parallel_settings.o: parallel_settings.cc
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- $(PIC_CXXFLAGS) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
@@ -181,11 +181,7 @@ AM_MAKEFLAGS = \
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -197,8 +193,18 @@ AM_MAKEFLAGS = \
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
index f36742ba021..c3173bc91f2 100644
--- a/libstdc++-v3/src/c++98/Makefile.in
+++ b/libstdc++-v3/src/c++98/Makefile.in
@@ -192,7 +192,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -240,7 +239,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
@@ -400,7 +402,7 @@ PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- $(PIC_CXXFLAGS) \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
@@ -410,11 +412,7 @@ AM_MAKEFLAGS = \
# Libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
-# last. (That way, things like -O2 passed down from the toplevel can
-# be overridden by --enable-debug.)
-
-# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
@@ -426,8 +424,18 @@ AM_MAKEFLAGS = \
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
-# We have to put --tag disable-shared after --tag CXX lest things
-# CXX undo the affect of disable-shared.
+#
+# The second tag argument, `--tag disable-shared` means that libtool
+# only compiles each source once, for static objects. In actuality,
+# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
+# the libtool command that is used create the object, which is
+# suitable for shared libraries. The `--tag disable-shared` must be
+# placed after --tag CXX lest things CXX undo the affect of
+# disable-shared.
+
+# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
diff --git a/libstdc++-v3/src/c++98/compatibility-list-2.cc b/libstdc++-v3/src/c++98/compatibility-list-2.cc
index 975450cb100..0e118ff4371 100644
--- a/libstdc++-v3/src/c++98/compatibility-list-2.cc
+++ b/libstdc++-v3/src/c++98/compatibility-list-2.cc
@@ -24,7 +24,7 @@
#include <bits/move.h>
-#ifdef PIC
+#ifdef _GLIBCXX_SHARED
#ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT
# define _GLIBCXX_BEGIN_NAMESPACE_COMPAT
diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc
index 38d9e4b6743..9f423d0e821 100644
--- a/libstdc++-v3/src/c++98/compatibility.cc
+++ b/libstdc++-v3/src/c++98/compatibility.cc
@@ -25,7 +25,7 @@
#include <bits/c++config.h>
-#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
#define istreambuf_iterator istreambuf_iteratorXX
@@ -204,7 +204,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
// NB: These symbols renames should go into the shared library only,
// and only those shared libraries that support versioning.
-#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
@@ -529,7 +529,7 @@ extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
#ifdef _GLIBCXX_SYMVER_DARWIN
-#if (defined(__ppc__) || defined(__ppc64__)) && defined(PIC)
+#if (defined(__ppc__) || defined(__ppc64__)) && defined(_GLIBCXX_SHARED)
/* __eprintf shouldn't have been made visible from libstdc++, or
anywhere, but on Mac OS X 10.4 it was defined in
libstdc++.6.0.3.dylib; so on that platform we have to keep defining
diff --git a/libstdc++-v3/testsuite/17_intro/shared_with_static_deps.cc b/libstdc++-v3/testsuite/17_intro/shared_with_static_deps.cc
new file mode 100644
index 00000000000..7feac92cce1
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/shared_with_static_deps.cc
@@ -0,0 +1,33 @@
+// { dg-do link }
+// { dg-require-static-libstdcxx }
+// { dg-require-sharedlib "" }
+// { dg-require-effective-target fpic }
+// { dg-options "-shared -fPIC -static-libgcc -static-libstdc++" }
+
+// Copyright (C) 2012 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/>
+
+// libstdc++/28811 --with-pic vs. static linking
+#include <iostream>
+#include <locale>
+
+int main()
+{
+ std::locale c __attribute__((unused)) = std::locale::classic();
+ std::cout << "i am old-skool\n";
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/18_support/initializer_list/range_access.cc b/libstdc++-v3/testsuite/18_support/initializer_list/range_access.cc
index f4bf96bb3ef..ba5a0d4909d 100644
--- a/libstdc++-v3/testsuite/18_support/initializer_list/range_access.cc
+++ b/libstdc++-v3/testsuite/18_support/initializer_list/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index fa2123114d5..2bc87b1615e 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011, 2012 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
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.7.11 Function template bind
+// 20.8.9 Function template bind
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/55320.cc b/libstdc++-v3/testsuite/20_util/function/cons/55320.cc
new file mode 100644
index 00000000000..611e8acbbf4
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function/cons/55320.cc
@@ -0,0 +1,46 @@
+// Copyright (C) 2012 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/>.
+
+// libstdc++/55320
+
+// { dg-options "-std=gnu++0x" }
+
+#include <functional>
+#include <testsuite_hooks.h>
+
+struct X
+{
+ X() { ++count; }
+ X(const X&) { throw 1; }
+ ~X() { --count; }
+ void operator()() { }
+ static int count;
+};
+
+int X::count = 0;
+
+int main()
+{
+ try
+ {
+ std::function<void()> f = X();
+ }
+ catch (int)
+ {
+ VERIFY( X::count == 0 );
+ }
+}
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/addressof.cc b/libstdc++-v3/testsuite/20_util/function/cons/addressof.cc
new file mode 100644
index 00000000000..25b6fb84bec
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function/cons/addressof.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2012 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/>.
+
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+#include <functional>
+
+struct F
+{
+ void operator()() { }
+ void operator&() const { }
+};
+
+void test01()
+{
+ F f;
+ std::function<void()> f1 = f;
+ std::function<void()> f2 = std::ref(f);
+}
+
+int main()
+{
+ test01();
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/55123.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/55123.cc
new file mode 100644
index 00000000000..6628d4bf16e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/55123.cc
@@ -0,0 +1,28 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2012 Free Software Foundation
+//
+// 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 <memory>
+
+// libstdc++/55123
+
+void f() {
+ std::unique_ptr<const int> y;
+ std::shared_ptr<const int> x = std::move(y);
+}
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc
index 5d1ba942d54..788f7b17279 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc
index fc11a74eba9..1a29613f4fe 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc
index 666445a152d..cd0d4eb51fb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc
index 9fce4403ddf..88f7c0ab08e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/range_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/range_access/char/1.cc
index 458bf53e2c5..2a0a1bc6365 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/range_access/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/range_access/char/1.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/range_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/range_access/wchar_t/1.cc
index e300b092389..b58332c014a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/range_access/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/range_access/wchar_t/1.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/array/element_access/at_neg.cc b/libstdc++-v3/testsuite/23_containers/array/element_access/at_neg.cc
index 4b3814f3b12..08b91e5937c 100644
--- a/libstdc++-v3/testsuite/23_containers/array/element_access/at_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/element_access/at_neg.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/array/range_access.cc b/libstdc++-v3/testsuite/23_containers/array/range_access.cc
index 77d036276fb..fb691d0d80e 100644
--- a/libstdc++-v3/testsuite/23_containers/array/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc
index 6e34f0bff41..c5d70dcf704 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134-2.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc
index b7e12b3d1c7..23d4dfc7021 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc
index 5f7fac6df4a..4cd5564560b 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/deque/range_access.cc b/libstdc++-v3/testsuite/23_containers/deque/range_access.cc
index d996ed6d1b0..7c758895453 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc
index 4798e93e077..702acfe34cc 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/1.cc
index 0f9eb458581..7dec2a4b49a 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/2.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/2.cc
index c12282b7168..eb447274b5d 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/3.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/3.cc
index 572b9ee331b..6197731cb78 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/3.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/4.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/4.cc
index a19d47a869e..3d23719ca68 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/5.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/5.cc
index 6f45a73a77a..ca7b5f7e6e6 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/5.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/5.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/6.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/6.cc
index 3fccff43451..f385661f2c8 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/6.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/6.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/7.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/7.cc
index 54e3527a8b8..f037791346b 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/7.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/7.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/8.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/8.cc
index 42470342e6c..3cf4288f42b 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/8.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/8.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/9.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/9.cc
index 590fad669bc..ce7bb859745 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/9.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/9.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc
index 23ea900b87d..57e0e2f532e 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after1_neg.cc
index f2cd59370a2..8f36076194c 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after1_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after2_neg.cc
index 6e243359505..2efaa74cac8 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after2_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after3_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after3_neg.cc
index 70a0a345688..b17707e6160 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after3_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after3_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after4_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after4_neg.cc
index 9e4b3d49933..087abcecdbb 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after4_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after4_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after5_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after5_neg.cc
index 6aabbea6085..46a74da5f9f 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after5_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after5_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after6_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after6_neg.cc
index 29c418a08dd..a057c9cfa70 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after6_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after6_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after7_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after7_neg.cc
index 9390827c086..49a48f74d8f 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after7_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after7_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after8_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after8_neg.cc
index 77dcb750eb7..a1ff667f586 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after8_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after8_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after9_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after9_neg.cc
index 42fe2023423..3d25787dee3 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after9_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/erase_after9_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after1_neg.cc
index 08d49a54ab3..84d39ae993a 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after1_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after2_neg.cc
index db9fd5e093c..18e1670cc31 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after2_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after3_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after3_neg.cc
index 4ad698f3c95..325028c72a4 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after3_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/insert_after3_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc
index 4a93666b224..6238f6f8fd6 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc
index 4cc1cfcf78d..e19be90ebdb 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1_neg.cc
index 3ee7f689aeb..d0cee48b2b2 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2_neg.cc
index 6a7fcfb22c2..54556232294 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3_neg.cc
index 55e50dc0511..1e63e90a5c1 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4_neg.cc
index 4c161906e0a..9582a8b3ec1 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc
index 486bfcf0724..85884c0af05 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/1.cc
index 18b6f3c0541..09ad6aa6ed3 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/2.cc
index b6ae3f3795c..b6c6e35eb8a 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/3.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/3.cc
index cade58f7dac..349be4c2eb3 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/3.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/4.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/4.cc
index 10444f0500c..554ac030dfb 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/5.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/5.cc
index 65190789cc7..26a422665c1 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/5.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/5.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/6.cc b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/6.cc
index e160381a776..43a11be2856 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/6.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/modifiers/6.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/1.cc
index 4a9e3644527..31eaaa5a460 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/2.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/2.cc
index 32a7db3eaa7..fe12af9aa63 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/3.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/3.cc
index f227daa1f3e..f112bc2d89f 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/3.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/4.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/4.cc
index 3bf61aad9fa..6c09065e553 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/5.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/5.cc
index 1291a269044..55d1634c400 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/5.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/5.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/6.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/6.cc
index 2b8e3c74d4f..082d2adbbcb 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/6.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/6.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/operations/7.cc b/libstdc++-v3/testsuite/23_containers/forward_list/operations/7.cc
index bad78e26509..fd71cb63143 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/operations/7.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/operations/7.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/range_access.cc b/libstdc++-v3/testsuite/23_containers/forward_list/range_access.cc
index 378cd9f0b1e..350b8286ca1 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
index cb6c29ac8d1..3b0e8dc7255 100644
--- a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/1.h b/libstdc++-v3/testsuite/23_containers/list/capacity/1.h
index 4a2f2bc06a2..408e0786c52 100644
--- a/libstdc++-v3/testsuite/23_containers/list/capacity/1.h
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/1.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
index f2f51f22352..d8c88b526b0 100644
--- a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
index cf8c20a6578..4d56b154ab1 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.h b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.h
index 2d7e45bb1ed..2abc063e1b1 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.h
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/1_c++0x.cc
index c055f70bc74..dea0d4c44cf 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/1_c++0x.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/1_c++0x.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
index ee9b54923df..1879ed2e5ae 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.h b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.h
index e95f797cb51..b25467bdb19 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.h
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
index 8454c3f46fa..990cf227cfa 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.h b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.h
index 64602ac4c1b..c4017db49a9 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.h
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
index eb286e0f54d..6fbcf6c1723 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.h b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.h
index aebbe0ba537..772128d95bf 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.h
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/1.cc b/libstdc++-v3/testsuite/23_containers/list/operations/1.cc
index 2c98213e2a5..48c7d908cf6 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/1.h b/libstdc++-v3/testsuite/23_containers/list/operations/1.h
index 2f3f9df9465..601c5e77260 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/1.h
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/1.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/2.cc b/libstdc++-v3/testsuite/23_containers/list/operations/2.cc
index 100066fc29b..7cd57622019 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/2.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/2.h b/libstdc++-v3/testsuite/23_containers/list/operations/2.h
index 8eb3da4e780..6db3333bd08 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/2.h
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/2.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/2_c++0x.cc b/libstdc++-v3/testsuite/23_containers/list/operations/2_c++0x.cc
index faaf2f765b1..6d744a0151c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/2_c++0x.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/2_c++0x.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/3.cc b/libstdc++-v3/testsuite/23_containers/list/operations/3.cc
index 53570b4a694..1ed46b21dc6 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/3.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/3.h b/libstdc++-v3/testsuite/23_containers/list/operations/3.h
index 4d28daea12b..9181e7ea9fc 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/3.h
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/3.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/3_c++0x.cc b/libstdc++-v3/testsuite/23_containers/list/operations/3_c++0x.cc
index 0598cfb225b..37a480606ff 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/3_c++0x.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/3_c++0x.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/4.cc b/libstdc++-v3/testsuite/23_containers/list/operations/4.cc
index a220b9b331f..4e14f1ae62a 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/4.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/4.h b/libstdc++-v3/testsuite/23_containers/list/operations/4.h
index 0a3ea4d234d..6502827470c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/4.h
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/4.h
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/42352.cc b/libstdc++-v3/testsuite/23_containers/list/operations/42352.cc
index a61071acc10..7e6c9c4f12d 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/42352.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/42352.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/5.cc b/libstdc++-v3/testsuite/23_containers/list/operations/5.cc
index ad99c27ae42..bcfbb81b77e 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/5.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/5.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/operations/5.h b/libstdc++-v3/testsuite/23_containers/list/operations/5.h
index 2b54d5195ff..0820e8a6952 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operations/5.h
+++ b/libstdc++-v3/testsuite/23_containers/list/operations/5.h
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/list/range_access.cc b/libstdc++-v3/testsuite/23_containers/list/range_access.cc
index afe148d9e66..768bd638a68 100644
--- a/libstdc++-v3/testsuite/23_containers/list/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc
index 41e43c6688a..303160801aa 100644
--- a/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/map/range_access.cc b/libstdc++-v3/testsuite/23_containers/map/range_access.cc
index 2fb7f4ac943..1e4e3c18780 100644
--- a/libstdc++-v3/testsuite/23_containers/map/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc
index 8ec893114dc..a8e407daf90 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/range_access.cc b/libstdc++-v3/testsuite/23_containers/multimap/range_access.cc
index da4c77b4aca..0f1c5bc5384 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc
index 84372de8078..0a05f83c521 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/range_access.cc b/libstdc++-v3/testsuite/23_containers/multiset/range_access.cc
index b8e3accce6c..d3fb95ea2a1 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc
index a0ab5405116..7d9bccd0f05 100644
--- a/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/set/range_access.cc b/libstdc++-v3/testsuite/23_containers/set/range_access.cc
index ffbda4e93fe..b1c33b773ef 100644
--- a/libstdc++-v3/testsuite/23_containers/set/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/final_hash.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/final_hash.cc
index c509a34afee..d651732a66f 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/final_hash.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/final_hash.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc
index 4a6847e5c0b..089cf512d99 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc
index b41b6a5b3ee..1555c48963c 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc
index bf05fab0d28..c75ed9b09aa 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc
index 704f5998c0d..ed05d208f5b 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/final_hash.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/final_hash.cc
index 4e2920c2437..7950713a7e0 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/final_hash.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/final_hash.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc
new file mode 100644
index 00000000000..fc17256f4bb
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc
@@ -0,0 +1,40 @@
+// { dg-options "-std=gnu++0x -D_GLIBCXX_DEBUG" }
+//
+// Copyright (C) 2012 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/>.
+
+// libstdc++/55028
+#include <string>
+#include <unordered_map>
+#include <testsuite_hooks.h>
+
+struct MyType
+{ };
+
+void test()
+{
+ // using MyMap = std::multimap<std::string, MyType *>; // works
+ using MyMap = std::unordered_multimap<std::string, MyType*>; // fails to link
+ MyMap m;
+ m.insert(std::make_pair(std::string("blah"), new MyType));
+}
+
+int main()
+{
+ test();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc
index 634bd9d3b68..456074e30d1 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/range_access.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/range_access.cc
index f95a6681b1b..bfc8ac1c4d2 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/final_hash.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/final_hash.cc
index 242642f2bba..c65b17d3309 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/final_hash.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/final_hash.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc
index 0ea3e5bf0c8..2c8b4e6cc91 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/range_access.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/range_access.cc
index 137b0d6d2e9..ac0fdaa2cc3 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc
index 5dced4cd1a6..e661ee401fb 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
index b8957c31813..3a6984c4500 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-error "static assertion failed" "" { target *-*-* } 186 }
+// { dg-error "static assertion failed" "" { target *-*-* } 185 }
#include <unordered_set>
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc
index aba6f771d81..41f428a51db 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc
@@ -40,8 +40,28 @@ void test01()
}
}
+void test02()
+{
+ const int N = 1000;
+
+ typedef std::unordered_set<int> Set;
+ Set s;
+ s.reserve(N);
+ s.reserve(N);
+
+ std::size_t bkts = s.bucket_count();
+ for (int i = 0; i != N; ++i)
+ {
+ s.insert(i);
+ // As long as we insert less than the reserved number of elements we
+ // shouldn't experiment any rehash.
+ VERIFY( s.bucket_count() == bkts );
+ }
+}
+
int main()
{
test01();
+ test02();
return 0;
}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc
index c18b0598464..a1c0c8474e0 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
index ea116c364af..2bb738afd91 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
index 067e57a5e26..9053b000e4d 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
index 760f10c7e85..7cfa4ad474b 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
index cd5a6a42483..f6d0e15eddd 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
index fc591997318..5cd3d0e1314 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc
index 7f6f9f252a3..c48e474e938 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134-2.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc
index af6460a2bf0..72fac56c2b2 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc
index 2a737891b0a..482166cab29 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit2.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit2.cc
index 81cd55a8f27..2cc5a7d0cee 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit2.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/23_containers/vector/range_access.cc b/libstdc++-v3/testsuite/23_containers/vector/range_access.cc
index 0a10959b240..cbcbf614496 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/range_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/24_iterators/range_access.cc b/libstdc++-v3/testsuite/24_iterators/range_access.cc
index 3bd1d2e5da3..e2e37e34c68 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_access.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/1.cc
index 92c5adebc72..d73c15427ff 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy/2.cc
index 9a6e3036e2f..08d3f59949a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/2.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/3.cc b/libstdc++-v3/testsuite/25_algorithms/copy/3.cc
index 5822b783d07..29caf3ae9a0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/3.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc b/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc
index ebc8d9c54a4..612eb48724e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/4.cc
index e3de207f57b..885561a2bf4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/4.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/deque_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/deque_iterators/1.cc
index 5d100e8714d..172c2aed2b5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/deque_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/deque_iterators/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc
index e07c4920cd2..4781ba1de3a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc
index aef55f1a049..ab66f725142 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc
index d1beb445744..201e2787192 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc
index 37eb415352c..d8f5dbfc61b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/3.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
index 7b36e26f957..62ecf686ddf 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc
index c378c571fb7..655b3242dc0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc
index f4d8b8b8256..d7871320b07 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc
index 016f241ddbd..ac50b87de3c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/3.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc
index ad3aae527d8..56a5cdef631 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/deque_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/deque_iterators/1.cc
index 57405cc80e8..211de81293d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/deque_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/deque_iterators/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc
index aaf50064f16..2f697b0b357 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/1.cc
index ce820bb2c7f..85c5db792a2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/2.cc
index c59fdb5b67e..8d3411badf7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/2.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/3.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/3.cc
index b12e4b85189..75d139b8ffa 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/3.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/4.cc
index d6759fab58c..21a95a076fb 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/4.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/50119.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/50119.cc
index 6803f964467..d6f0630a740 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/50119.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/50119.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/move_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/move_iterators/1.cc
index 6c22ba672ac..2db2479bd53 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/move_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/move_iterators/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/4.cc b/libstdc++-v3/testsuite/25_algorithms/fill/4.cc
index bf7094e9279..838a71720e5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/4.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/1.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/1.cc
index edabe1fcc29..78a3c231227 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill_n/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc
index 25206629a42..fca18d9161a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
index 695fe46d416..1a4b339d78c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc
index 235a6338387..8dc5742b3b1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc
index 161b2250e7e..9251d611776 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/1.cc b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc
index 49d3dee1a8b..1683a83f78f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc
@@ -8,7 +8,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
index 1506b5f72f7..b16667911c7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc b/libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc
index 86eefbee63c..562ab466ae7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc
index 954a65dfa66..605fc45ce72 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc
index 7c612e659d5..e4cc7a06762 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc
index 41339b85bf3..87efdeff383 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc
index 1c3d7aa31d1..cb756ca4f86 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/1.cc b/libstdc++-v3/testsuite/25_algorithms/move/1.cc
index b577cfa5d6d..65c42d12d65 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/deque_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/move/deque_iterators/1.cc
index 0e0debf7baa..a97dfc01113 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/deque_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/deque_iterators/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc
index 436ccb03124..21120046641 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/deque_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/deque_iterators/1.cc
index 9a8ba71206f..f695a6d720c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move_backward/deque_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/deque_iterators/1.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/1.cc b/libstdc++-v3/testsuite/25_algorithms/partition/1.cc
index 0ea55ef3d81..bbad940a413 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc
index 925811bd61b..94ef5a980fe 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty2_neg.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty2_neg.cc
index 022a1b29af5..de6b4765b16 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty2_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty2_neg.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty_neg.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty_neg.cc
index 57b3f17f01d..e5183011493 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/empty_neg.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc
index 7ca9ea4d56c..a77e8893840 100644
--- a/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
index 95d50061879..6a98a72ac22 100644
--- a/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
index c5f95f36779..7a3d214e33e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
@@ -9,7 +9,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/cons/55215.cc
new file mode 100644
index 00000000000..c655b262062
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/cons/55215.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::ranlux24(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::ranlux24();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc
new file mode 100644
index 00000000000..4b502b7d7c0
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc
@@ -0,0 +1,60 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::independent_bits_engine<std::mt19937, 9,
+ std::uint_fast32_t>(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::independent_bits_engine<std::mt19937, 9,
+ std::uint_fast32_t>();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/cons/55215.cc
new file mode 100644
index 00000000000..21333fba97d
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/cons/55215.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::minstd_rand(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::minstd_rand();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc
new file mode 100644
index 00000000000..3453d9f727a
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::mt19937(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::mt19937();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc
new file mode 100644
index 00000000000..d7db635d8ef
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::knuth_b(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::knuth_b();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/cons/55215.cc b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/cons/55215.cc
new file mode 100644
index 00000000000..4927d771667
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/cons/55215.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 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 <random>
+#include <testsuite_hooks.h>
+
+int f(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::ranlux24_base(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+int g(int x)
+{
+ std::seed_seq sq(&x, &x + 1);
+ auto rnd = std::ranlux24_base();
+ rnd.seed(sq);
+ return std::uniform_int_distribution<int>()(rnd);
+}
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int f1 = f(0);
+ const int f2 = f(0);
+
+ const int g1 = g(0);
+ const int g2 = g(0);
+
+ VERIFY( f1 == f2 );
+ VERIFY( g1 == g2 );
+ VERIFY( f1 == g1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/range_access.cc b/libstdc++-v3/testsuite/26_numerics/valarray/range_access.cc
index be08d0298d3..10f67dac866 100644
--- a/libstdc++-v3/testsuite/26_numerics/valarray/range_access.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/28_regex/range_access.cc b/libstdc++-v3/testsuite/28_regex/range_access.cc
index 0bd620f0bd5..b913bc47c0b 100644
--- a/libstdc++-v3/testsuite/28_regex/range_access.cc
+++ b/libstdc++-v3/testsuite/28_regex/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
new file mode 100644
index 00000000000..f91509c492a
--- /dev/null
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2012 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/>.
+
+// PR libstdc++/53841
+
+#include <chrono>
+#include <mutex>
+#include <condition_variable>
+
+namespace ch = std::chrono;
+
+struct FPClock : ch::system_clock
+{
+ typedef double rep;
+ typedef std::ratio<1> period;
+ typedef ch::duration<rep, period> duration;
+ typedef ch::time_point<FPClock> time_point;
+
+ static time_point now()
+ { return time_point(duration(system_clock::now().time_since_epoch())); }
+};
+
+void f()
+{
+ std::mutex mx;
+ std::unique_lock<std::mutex> l(mx);
+ std::condition_variable cv;
+ cv.wait_until(l, FPClock::now());
+}
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index bb077d148a6..3c4f39ec32d 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -160,7 +160,6 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PDFLATEX = @PDFLATEX@
-PIC_CXXFLAGS = @PIC_CXXFLAGS@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
@@ -208,7 +207,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
+glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
+glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
glibcxx_localedir = @glibcxx_localedir@
+glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
diff --git a/libstdc++-v3/testsuite/ext/vstring/capacity/29134.cc b/libstdc++-v3/testsuite/ext/vstring/capacity/29134.cc
index 337df66706f..b572f1eb7a1 100644
--- a/libstdc++-v3/testsuite/ext/vstring/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/capacity/29134.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc b/libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc
index e6737de0e31..bed965a5e56 100644
--- a/libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc
@@ -11,7 +11,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc b/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc
index db0bc03f096..94dce3787f6 100644
--- a/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc b/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc
index 83edbe11a8c..d23a882de3e 100644
--- a/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/ext/vstring/range_access.cc b/libstdc++-v3/testsuite/ext/vstring/range_access.cc
index 32322924709..f734e92c72b 100644
--- a/libstdc++-v3/testsuite/ext/vstring/range_access.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/range_access.cc
@@ -10,7 +10,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc b/libstdc++-v3/testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc
index c7dbdc006c2..461dfc044ad 100644
--- a/libstdc++-v3/testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/copy_deque_iterators.cc b/libstdc++-v3/testsuite/performance/25_algorithms/copy_deque_iterators.cc
index 4318bd4f460..35d5d79dec9 100644
--- a/libstdc++-v3/testsuite/performance/25_algorithms/copy_deque_iterators.cc
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/copy_deque_iterators.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/function/10.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/function/10.cc
new file mode 100644
index 00000000000..ca29e3cc3fb
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/3_function_objects/function/10.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2012 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/>.
+
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+#include <tr1/functional>
+
+struct F
+{
+ void operator()() { }
+ void operator&() const { }
+};
+
+void test01()
+{
+ F f;
+ std::tr1::function<void()> f1 = f;
+ std::tr1::function<void()> f2 = std::tr1::ref(f);
+}
+
+int main()
+{
+ test01();
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc
index 5d2927077e7..08d87f2df27 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
index 4f1b060f800..970593e0d6e 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
index 2a74c3c3629..a0b3fd85c4f 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc
index 0831bd5295d..63abcd41e91 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc
@@ -7,7 +7,7 @@
// any later version.
// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// 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.