From 484f6cd6367320abbe3594b64b1389a7b23b63bc Mon Sep 17 00:00:00 2001 From: clyon Date: Thu, 14 Nov 2013 19:31:27 +0000 Subject: [PATCH] Merge from branches/gcc-4_8-branch up to rev 204657. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro@204811 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc-4_8-branch/ChangeLog | 4 + gcc-4_8-branch/boehm-gc/ChangeLog | 4 + gcc-4_8-branch/config/ChangeLog | 4 + gcc-4_8-branch/contrib/ChangeLog | 8 + gcc-4_8-branch/contrib/gcc_update | 2 +- gcc-4_8-branch/contrib/reghunt/ChangeLog | 4 + gcc-4_8-branch/contrib/regression/ChangeLog | 4 + gcc-4_8-branch/fixincludes/ChangeLog | 4 + gcc-4_8-branch/gcc/BASE-VER | 2 +- gcc-4_8-branch/gcc/ChangeLog | 162 ++++++++++- gcc-4_8-branch/gcc/DATESTAMP | 2 +- gcc-4_8-branch/gcc/ada/ChangeLog | 16 ++ gcc-4_8-branch/gcc/ada/gcc-interface/utils.c | 142 ++++++---- gcc-4_8-branch/gcc/alias.c | 17 +- gcc-4_8-branch/gcc/c-family/ChangeLog | 12 + gcc-4_8-branch/gcc/c-family/c-common.c | 5 + gcc-4_8-branch/gcc/c/ChangeLog | 4 + gcc-4_8-branch/gcc/cfgexpand.c | 12 +- gcc-4_8-branch/gcc/cgraph.c | 43 +++ gcc-4_8-branch/gcc/cgraph.h | 1 + gcc-4_8-branch/gcc/cgraphbuild.c | 14 +- gcc-4_8-branch/gcc/combine.c | 11 +- gcc-4_8-branch/gcc/config/i386/i386.c | 66 +++-- gcc-4_8-branch/gcc/config/i386/i386.md | 42 ++- gcc-4_8-branch/gcc/config/i386/t-rtems | 7 +- gcc-4_8-branch/gcc/config/rs6000/rs6000.md | 8 +- gcc-4_8-branch/gcc/config/sh/sh.opt | 2 +- gcc-4_8-branch/gcc/configure | 8 +- gcc-4_8-branch/gcc/configure.ac | 8 +- gcc-4_8-branch/gcc/cp/ChangeLog | 27 ++ gcc-4_8-branch/gcc/cp/decl2.c | 28 +- gcc-4_8-branch/gcc/cp/except.c | 3 + gcc-4_8-branch/gcc/cp/parser.c | 4 - gcc-4_8-branch/gcc/cp/semantics.c | 9 +- gcc-4_8-branch/gcc/fortran/ChangeLog | 19 ++ gcc-4_8-branch/gcc/fortran/check.c | 2 +- gcc-4_8-branch/gcc/fortran/decl.c | 8 +- gcc-4_8-branch/gcc/gimple-fold.c | 2 +- gcc-4_8-branch/gcc/go/ChangeLog | 18 ++ gcc-4_8-branch/gcc/go/go-gcc.cc | 87 ++++++ gcc-4_8-branch/gcc/go/gofrontend/backend.h | 34 ++- gcc-4_8-branch/gcc/go/gofrontend/expressions.cc | 153 ++++++++--- gcc-4_8-branch/gcc/go/gofrontend/expressions.h | 4 +- gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc | 300 ++++----------------- gcc-4_8-branch/gcc/go/gofrontend/gogo.cc | 147 +++++++++- gcc-4_8-branch/gcc/go/gofrontend/gogo.h | 39 +-- gcc-4_8-branch/gcc/go/gofrontend/import.h | 5 + gcc-4_8-branch/gcc/go/gofrontend/lex.cc | 23 +- gcc-4_8-branch/gcc/go/gofrontend/parse.cc | 2 + gcc-4_8-branch/gcc/go/gofrontend/runtime.cc | 7 + gcc-4_8-branch/gcc/go/gofrontend/runtime.def | 6 + gcc-4_8-branch/gcc/go/gofrontend/types.cc | 168 +++++++----- gcc-4_8-branch/gcc/go/gofrontend/types.h | 24 +- gcc-4_8-branch/gcc/ipa-prop.c | 45 +--- gcc-4_8-branch/gcc/java/ChangeLog | 4 + gcc-4_8-branch/gcc/lto/ChangeLog | 4 + gcc-4_8-branch/gcc/objc/ChangeLog | 4 + gcc-4_8-branch/gcc/objcp/ChangeLog | 4 + gcc-4_8-branch/gcc/optabs.c | 16 +- gcc-4_8-branch/gcc/po/ChangeLog | 4 + gcc-4_8-branch/gcc/recog.c | 5 +- gcc-4_8-branch/gcc/testsuite/ChangeLog | 155 +++++++++-- .../gcc/testsuite/g++.dg/cpp0x/decltype57.C | 8 + gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum18.C | 2 +- .../testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C | 7 + .../gcc/testsuite/g++.dg/diagnostic/pr58979.C | 4 + .../gcc/testsuite/g++.dg/tm/noexcept-6.C | 23 ++ .../gcc/testsuite/gcc.c-torture/execute/pr58831.c | 40 +++ .../gcc/testsuite/gcc.c-torture/execute/pr58984.c | 57 ++++ .../gcc/testsuite/gcc.dg/atomic-store-6.c | 13 + gcc-4_8-branch/gcc/testsuite/gcc.dg/pr57518.c | 5 +- gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58805.c | 24 ++ .../gcc/testsuite/gcc.dg/torture/pr57488.c | 58 ++++ .../gcc/testsuite/gcc.dg/torture/pr58079.c | 107 ++++++++ .../gcc/testsuite/gcc.dg/torture/pr58670.c | 2 +- .../gcc/testsuite/gcc.dg/torture/pr58779.c | 12 + .../gcc/testsuite/gcc.dg/torture/pr58830.c | 42 +++ .../gcc.target/arm/require-pic-register-loc.c | 29 ++ .../gcc/testsuite/gcc.target/i386/pr30315.c | 44 +-- .../gcc/testsuite/gcc.target/i386/pr58690.c | 14 + .../gcc/testsuite/gcc.target/i386/pr59034-1.c | 10 + .../gcc/testsuite/gcc.target/i386/pr59034-2.c | 10 + .../gcc/testsuite/gcc.target/sh/pr54089-3.c | 2 +- .../gcc/testsuite/gfortran.dg/extends_15.f90 | 16 ++ .../gcc/testsuite/gfortran.dg/reshape_6.f90 | 19 ++ gcc-4_8-branch/gcc/tree-ssa-pre.c | 6 + gcc-4_8-branch/gcc/tree-ssa-tail-merge.c | 3 +- gcc-4_8-branch/gnattools/ChangeLog | 4 + gcc-4_8-branch/include/ChangeLog | 4 + gcc-4_8-branch/intl/ChangeLog | 4 + gcc-4_8-branch/libada/ChangeLog | 4 + gcc-4_8-branch/libatomic/ChangeLog | 4 + gcc-4_8-branch/libbacktrace/ChangeLog | 4 + gcc-4_8-branch/libcpp/ChangeLog | 4 + gcc-4_8-branch/libcpp/po/ChangeLog | 8 + gcc-4_8-branch/libcpp/po/tr.po | 139 ++++------ gcc-4_8-branch/libdecnumber/ChangeLog | 4 + gcc-4_8-branch/libffi/ChangeLog | 4 + gcc-4_8-branch/libgcc/ChangeLog | 22 ++ .../libgcc/config/i386/cygming-crtbegin.c | 14 +- gcc-4_8-branch/libgcc/config/i386/sfp-exceptions.c | 30 ++- gcc-4_8-branch/libgcc/config/libbid/ChangeLog | 4 + gcc-4_8-branch/libgfortran/ChangeLog | 4 + gcc-4_8-branch/libgo/Makefile.am | 1 + gcc-4_8-branch/libgo/Makefile.in | 11 +- gcc-4_8-branch/libgo/config.h.in | 15 ++ gcc-4_8-branch/libgo/configure | 2 +- gcc-4_8-branch/libgo/configure.ac | 2 +- gcc-4_8-branch/libgo/go/syscall/libcall_linux.go | 15 ++ gcc-4_8-branch/libgo/go/syscall/libcall_posix.go | 6 + gcc-4_8-branch/libgo/mksysinfo.sh | 4 + gcc-4_8-branch/libgo/runtime/go-cdiv.c | 46 ++++ gcc-4_8-branch/libgo/runtime/go-make-slice.c | 5 +- gcc-4_8-branch/libgo/runtime/go-nosys.c | 57 ++++ gcc-4_8-branch/libgo/runtime/go-signal.c | 7 +- gcc-4_8-branch/libgomp/ChangeLog | 4 + gcc-4_8-branch/libiberty/ChangeLog | 4 + gcc-4_8-branch/libitm/ChangeLog | 4 + gcc-4_8-branch/libjava/ChangeLog | 4 + gcc-4_8-branch/libjava/classpath/ChangeLog | 4 + gcc-4_8-branch/libjava/libltdl/ChangeLog | 4 + gcc-4_8-branch/libmudflap/ChangeLog | 4 + gcc-4_8-branch/libobjc/ChangeLog | 4 + gcc-4_8-branch/libquadmath/ChangeLog | 4 + gcc-4_8-branch/libsanitizer/ChangeLog | 4 + gcc-4_8-branch/libssp/ChangeLog | 4 + gcc-4_8-branch/libstdc++-v3/ChangeLog | 57 ++++ gcc-4_8-branch/libstdc++-v3/doc/html/api.html | 4 +- gcc-4_8-branch/libstdc++-v3/doc/html/bk02.html | 2 +- gcc-4_8-branch/libstdc++-v3/doc/html/bk03.html | 2 +- gcc-4_8-branch/libstdc++-v3/doc/html/faq.html | 4 +- gcc-4_8-branch/libstdc++-v3/doc/html/index.html | 8 +- .../libstdc++-v3/doc/html/manual/abi.html | 18 +- .../libstdc++-v3/doc/html/manual/algorithms.html | 6 +- .../libstdc++-v3/doc/html/manual/api.html | 6 +- .../libstdc++-v3/doc/html/manual/appendix.html | 4 +- .../doc/html/manual/appendix_contributing.html | 8 +- .../doc/html/manual/appendix_free.html | 4 +- .../doc/html/manual/appendix_gfdl.html | 2 +- .../libstdc++-v3/doc/html/manual/appendix_gpl.html | 6 +- .../doc/html/manual/appendix_porting.html | 8 +- .../libstdc++-v3/doc/html/manual/associative.html | 2 +- .../libstdc++-v3/doc/html/manual/atomics.html | 6 +- .../libstdc++-v3/doc/html/manual/backwards.html | 8 +- .../doc/html/manual/bitmap_allocator.html | 4 +- .../doc/html/manual/bitmap_allocator_impl.html | 4 +- .../libstdc++-v3/doc/html/manual/bugs.html | 2 +- .../doc/html/manual/concept_checking.html | 2 +- .../libstdc++-v3/doc/html/manual/concurrency.html | 6 +- .../libstdc++-v3/doc/html/manual/configure.html | 2 +- .../libstdc++-v3/doc/html/manual/containers.html | 6 +- .../doc/html/manual/containers_and_c.html | 2 +- .../libstdc++-v3/doc/html/manual/debug.html | 4 +- .../libstdc++-v3/doc/html/manual/debug_mode.html | 4 +- .../doc/html/manual/debug_mode_design.html | 4 +- .../doc/html/manual/debug_mode_semantics.html | 2 +- .../doc/html/manual/debug_mode_using.html | 46 ++-- .../libstdc++-v3/doc/html/manual/diagnostics.html | 6 +- .../doc/html/manual/documentation_hacking.html | 15 +- .../doc/html/manual/dynamic_memory.html | 2 +- .../doc/html/manual/ext_algorithms.html | 2 +- .../doc/html/manual/ext_compile_checks.html | 2 +- .../doc/html/manual/ext_concurrency.html | 4 +- .../doc/html/manual/ext_concurrency_impl.html | 2 +- .../doc/html/manual/ext_concurrency_use.html | 2 +- .../doc/html/manual/ext_containers.html | 4 +- .../doc/html/manual/ext_demangling.html | 2 +- .../libstdc++-v3/doc/html/manual/ext_io.html | 4 +- .../doc/html/manual/ext_iterators.html | 2 +- .../libstdc++-v3/doc/html/manual/ext_numerics.html | 2 +- .../libstdc++-v3/doc/html/manual/ext_preface.html | 4 +- .../libstdc++-v3/doc/html/manual/ext_sgi.html | 2 +- .../doc/html/manual/ext_utilities.html | 2 +- .../libstdc++-v3/doc/html/manual/extensions.html | 6 +- .../libstdc++-v3/doc/html/manual/facets.html | 58 ++-- .../libstdc++-v3/doc/html/manual/fstreams.html | 2 +- .../manual/generalized_numeric_operations.html | 2 +- .../libstdc++-v3/doc/html/manual/index.html | 24 +- .../libstdc++-v3/doc/html/manual/internals.html | 2 +- .../libstdc++-v3/doc/html/manual/intro.html | 16 +- .../libstdc++-v3/doc/html/manual/io.html | 6 +- .../libstdc++-v3/doc/html/manual/io_and_c.html | 2 +- .../libstdc++-v3/doc/html/manual/iterators.html | 6 +- .../libstdc++-v3/doc/html/manual/license.html | 2 +- .../libstdc++-v3/doc/html/manual/localization.html | 20 +- .../libstdc++-v3/doc/html/manual/make.html | 2 +- .../libstdc++-v3/doc/html/manual/memory.html | 46 ++-- .../libstdc++-v3/doc/html/manual/mt_allocator.html | 4 +- .../doc/html/manual/mt_allocator_design.html | 2 +- .../doc/html/manual/mt_allocator_ex_multi.html | 2 +- .../doc/html/manual/mt_allocator_ex_single.html | 2 +- .../doc/html/manual/mt_allocator_impl.html | 2 +- .../libstdc++-v3/doc/html/manual/numerics.html | 6 +- .../doc/html/manual/numerics_and_c.html | 2 +- .../libstdc++-v3/doc/html/manual/pairs.html | 2 +- .../doc/html/manual/parallel_mode.html | 8 +- .../doc/html/manual/parallel_mode_design.html | 2 +- .../doc/html/manual/parallel_mode_semantics.html | 2 +- .../doc/html/manual/parallel_mode_test.html | 2 +- .../doc/html/manual/parallel_mode_using.html | 130 ++++----- .../manual/policy_based_data_structures_test.html | 2 +- .../doc/html/manual/policy_data_structures.html | 20 +- .../html/manual/policy_data_structures_ack.html | 5 +- .../html/manual/policy_data_structures_design.html | 68 ++--- .../html/manual/policy_data_structures_using.html | 4 +- .../libstdc++-v3/doc/html/manual/profile_mode.html | 6 +- .../doc/html/manual/profile_mode_api.html | 2 +- .../doc/html/manual/profile_mode_cost_model.html | 2 +- .../doc/html/manual/profile_mode_design.html | 4 +- .../doc/html/manual/profile_mode_devel.html | 2 +- .../doc/html/manual/profile_mode_diagnostics.html | 8 +- .../doc/html/manual/profile_mode_impl.html | 2 +- .../libstdc++-v3/doc/html/manual/setup.html | 4 +- .../doc/html/manual/source_code_style.html | 2 +- .../doc/html/manual/source_design_notes.html | 2 +- .../doc/html/manual/source_organization.html | 2 +- .../libstdc++-v3/doc/html/manual/status.html | 14 +- .../libstdc++-v3/doc/html/manual/std_contents.html | 8 +- .../libstdc++-v3/doc/html/manual/streambufs.html | 2 +- .../libstdc++-v3/doc/html/manual/strings.html | 6 +- .../doc/html/manual/stringstreams.html | 2 +- .../libstdc++-v3/doc/html/manual/support.html | 6 +- .../libstdc++-v3/doc/html/manual/termination.html | 2 +- .../libstdc++-v3/doc/html/manual/test.html | 4 +- .../libstdc++-v3/doc/html/manual/traits.html | 2 +- .../doc/html/manual/unordered_associative.html | 2 +- .../libstdc++-v3/doc/html/manual/using.html | 28 +- .../doc/html/manual/using_concurrency.html | 2 +- .../doc/html/manual/using_dynamic_or_shared.html | 2 +- .../doc/html/manual/using_exceptions.html | 18 +- .../doc/html/manual/using_headers.html | 204 +++++++------- .../libstdc++-v3/doc/html/manual/using_macros.html | 2 +- .../doc/html/manual/using_namespaces.html | 2 +- .../libstdc++-v3/doc/html/manual/utilities.html | 6 +- .../libstdc++-v3/doc/xml/manual/spine.xml | 1 + .../libstdc++-v3/doc/xml/manual/status_cxx2011.xml | 5 +- .../libstdc++-v3/include/bits/shared_ptr_base.h | 4 +- .../libstdc++-v3/include/bits/stl_algo.h | 4 +- .../libstdc++-v3/include/c_global/cstdio | 1 + .../libstdc++-v3/include/debug/functions.h | 122 +-------- gcc-4_8-branch/libstdc++-v3/include/debug/macros.h | 20 +- .../testsuite/20_util/shared_ptr/cons/58839.cc | 33 +++ .../testsuite/25_algorithms/nth_element/58800.cc | 52 ++++ gcc-4_8-branch/lto-plugin/ChangeLog | 4 + gcc-4_8-branch/maintainer-scripts/ChangeLog | 4 + gcc-4_8-branch/zlib/ChangeLog | 4 + 246 files changed, 2973 insertions(+), 1395 deletions(-) create mode 100644 gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/decltype57.C create mode 100644 gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C create mode 100644 gcc-4_8-branch/gcc/testsuite/g++.dg/diagnostic/pr58979.C create mode 100644 gcc-4_8-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58984.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/atomic-store-6.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58805.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57488.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58079.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58779.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58830.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr58690.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-1.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-2.c create mode 100644 gcc-4_8-branch/gcc/testsuite/gfortran.dg/extends_15.f90 create mode 100644 gcc-4_8-branch/gcc/testsuite/gfortran.dg/reshape_6.f90 create mode 100644 gcc-4_8-branch/libgo/runtime/go-cdiv.c rewrite gcc-4_8-branch/libstdc++-v3/doc/html/manual/debug_mode_using.html (67%) rewrite gcc-4_8-branch/libstdc++-v3/doc/html/manual/intro.html (85%) rewrite gcc-4_8-branch/libstdc++-v3/doc/html/manual/parallel_mode_using.html (60%) rewrite gcc-4_8-branch/libstdc++-v3/doc/html/manual/using.html (71%) rewrite gcc-4_8-branch/libstdc++-v3/doc/html/manual/using_headers.html (67%) create mode 100644 gcc-4_8-branch/libstdc++-v3/testsuite/20_util/shared_ptr/cons/58839.cc create mode 100644 gcc-4_8-branch/libstdc++-v3/testsuite/25_algorithms/nth_element/58800.cc diff --git a/gcc-4_8-branch/ChangeLog b/gcc-4_8-branch/ChangeLog index 0bc4cbb1c6e..5358ac27f6d 100644 --- a/gcc-4_8-branch/ChangeLog +++ b/gcc-4_8-branch/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-09-03 Richard Biener * configure.ac: Also allow ISL 0.12. diff --git a/gcc-4_8-branch/boehm-gc/ChangeLog b/gcc-4_8-branch/boehm-gc/ChangeLog index fd7dfeb0b39..efb3eb86b44 100644 --- a/gcc-4_8-branch/boehm-gc/ChangeLog +++ b/gcc-4_8-branch/boehm-gc/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-09-04 Matthias Klose * Makefile.am (libgcjgc_la_LIBADD): Add EXTRA_TEST_LIBS. diff --git a/gcc-4_8-branch/config/ChangeLog b/gcc-4_8-branch/config/ChangeLog index c6af37a125b..33b7cf7ac65 100644 --- a/gcc-4_8-branch/config/ChangeLog +++ b/gcc-4_8-branch/config/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/contrib/ChangeLog b/gcc-4_8-branch/contrib/ChangeLog index 61a8390f106..1a4557ec232 100644 --- a/gcc-4_8-branch/contrib/ChangeLog +++ b/gcc-4_8-branch/contrib/ChangeLog @@ -1,3 +1,11 @@ +2013-10-21 Mike Stump + + * gcc_update (configure): Update to handle svn 1.8.1. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/contrib/gcc_update b/gcc-4_8-branch/contrib/gcc_update index 10a5970f621..212a99fc7d9 100755 --- a/gcc-4_8-branch/contrib/gcc_update +++ b/gcc-4_8-branch/contrib/gcc_update @@ -382,7 +382,7 @@ case $vcs_type in fi revision=`$GCC_SVN info | awk '/Revision:/ { print $2 }'` - branch=`$GCC_SVN info | sed -ne "/URL:/ { + branch=`$GCC_SVN info | sed -ne "/^URL:/ { s,.*/trunk,trunk, s,.*/branches/,, s,.*/tags/,, diff --git a/gcc-4_8-branch/contrib/reghunt/ChangeLog b/gcc-4_8-branch/contrib/reghunt/ChangeLog index b1429317b0d..e77d115e613 100644 --- a/gcc-4_8-branch/contrib/reghunt/ChangeLog +++ b/gcc-4_8-branch/contrib/reghunt/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/contrib/regression/ChangeLog b/gcc-4_8-branch/contrib/regression/ChangeLog index 4c24e12006a..e3259f6c229 100644 --- a/gcc-4_8-branch/contrib/regression/ChangeLog +++ b/gcc-4_8-branch/contrib/regression/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/fixincludes/ChangeLog b/gcc-4_8-branch/fixincludes/ChangeLog index f75064e1def..25cd5cfbf90 100644 --- a/gcc-4_8-branch/fixincludes/ChangeLog +++ b/gcc-4_8-branch/fixincludes/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Rainer Orth Backport from mainline: diff --git a/gcc-4_8-branch/gcc/BASE-VER b/gcc-4_8-branch/gcc/BASE-VER index 326ec6355f3..f99c6583c35 100644 --- a/gcc-4_8-branch/gcc/BASE-VER +++ b/gcc-4_8-branch/gcc/BASE-VER @@ -1 +1 @@ -4.8.2 +4.8.3 diff --git a/gcc-4_8-branch/gcc/ChangeLog b/gcc-4_8-branch/gcc/ChangeLog index c5ee5c8aa23..e0f20a9b435 100644 --- a/gcc-4_8-branch/gcc/ChangeLog +++ b/gcc-4_8-branch/gcc/ChangeLog @@ -1,3 +1,163 @@ +2013-11-10 Karlson2k + Kai Tietz + + Merged from trunk + PR plugins/52872 + * configure.ac: Adding for exported symbols check + and for rdynamic-check executable-extension. + * configure: Regenerated. + +2013-11-07 H.J. Lu + + PR target/59034 + * config/i386/i386.md (push peepholer/splitter): Use Pmode + with stack_pointer_rtx. + +2013-11-05 Uros Bizjak + + * config/i386/t-rtems (MULTILIB_MATCHES): Fix option typos. + +2013-11-05 Jakub Jelinek + + PR tree-optimization/58984 + * ipa-prop.c (ipa_load_from_parm_agg_1): Add SIZE_P argument, + set *SIZE_P if non-NULL on success. + (ipa_load_from_parm_agg, ipa_analyze_indirect_call_uses): Adjust + callers. + (ipcp_transform_function): Likewise. Punt if size of access + is different from TYPE_SIZE on v->value's type. + +2013-11-03 H.J. Lu + + Backport from mainline + 2013-10-12 H.J. Lu + + PR target/58690 + * config/i386/i386.c (ix86_copy_addr_to_reg): New function. + (ix86_expand_movmem): Replace copy_addr_to_reg with + ix86_copy_addr_to_reg. + (ix86_expand_setmem): Likewise. + +2013-10-29 Uros Bizjak + + Backport from mainline + 2013-08-08 Richard Sandiford + + PR rtl-optimization/58079 + * combine.c (combine_simplify_rtx): Avoid using SUBST if + simplify_comparison has widened a comparison with an integer. + +2013-10-29 Martin Jambor + + PR middle-end/58789 + Backport from mainline + 2013-05-09 Martin Jambor + + PR lto/57084 + * gimple-fold.c (canonicalize_constructor_val): Call + cgraph_get_create_real_symbol_node instead of cgraph_get_create_node. + + Backport from mainline + 2013-03-16 Jan Hubicka + + * cgraph.h (cgraph_get_create_real_symbol_node): Declare. + * cgraph.c (cgraph_get_create_real_symbol_node): New function. + * cgrpahbuild.c: Use cgraph_get_create_real_symbol_node instead + of cgraph_get_create_node. + * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise. + +2013-10-28 Tom de Vries + + * cfgexpand.c (gimple_expand_cfg): Remove test for parm_birth_insn. + Don't commit insertions after NOTE_INSN_FUNCTION_BEG. + +2013-10-26 Uros Bizjak + + Backport from mainline + 2013-10-22 Uros Bizjak + + PR target/58779 + * config/i386/i386.c (put_condition_code) : + Remove CCCmode handling. + : Return 'c' suffix for CCCmode. + : Return 'nc' suffix for CCCmode. + (ix86_cc_mode) : Do not generate overflow checks. + * config/i386/i386.md (*sub3_cconly_overflow): Remove. + (*sub3_cc_overflow): Ditto. + (*subsi3_zext_cc_overflow): Ditto. + +2013-10-26 Uros Bizjak + + Backport from mainline + 2013-10-19 Uros Bizjak + + PR target/58792 + * config/i386/i386.c (ix86_function_value_regno): Add DX_REG, + ST1_REG and XMM1_REG for 32bit and 64bit targets. Also add DI_REG + and SI_REG for 64bit SYSV ABI targets. + +2013-08-25 Richard Henderson + + PR rtl/58542 + * optabs.c (maybe_emit_atomic_exchange): Use create_input_operand + instead of create_convert_operand_to. + (maybe_emit_sync_lock_test_and_set): Likewise. + (expand_atomic_compare_and_swap): Likewise. + (maybe_emit_compare_and_swap_exchange_loop): Don't convert_modes. + +2013-10-25 Eric Botcazou + + PR rtl-optimization/58831 + * alias.c (init_alias_analysis): At the beginning of each iteration, set + the reg_seen[N] bit if static_reg_base_value[N] is non-null. + +2013-10-25 Eric Botcazou + + * recog.c (search_ofs): New static variable moved from... + (peep2_find_free_register): ...here. + (peephole2_optimize): Initialize it. + +2013-10-24 David Edelsohn + + Backport from mainline + 2013-10-23 David Edelsohn + + PR target/58838 + * config/rs6000/rs6000.md (mulsi3_internal1 and splitter): Add + TARGET_32BIT final condition. + (mulsi3_internal2 and splitter): Same. + +2013-10-23 Tom de Vries + + PR tree-optimization/58805 + * tree-ssa-tail-merge.c (stmt_local_def): Add gimple_vdef check. + +2013-10-23 Richard Biener + + Backport from mainline + 2013-06-24 Richard Biener + + PR tree-optimization/57488 + * tree-ssa-pre.c (insert): Clear NEW sets before each iteration. + +2013-10-16 Ganesh Gopalasubramanian + + Backport from mainline + 2013-10-16 Ganesh Gopalasubramanian + + + * config/i386/i386.c (ix86_option_override_internal): Enable FMA4 + for AMD bdver3. + +2013-10-16 Jakub Jelinek + + * BASE-VER: Set to 4.8.3. + * DEV-PHASE: Set to prerelease. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-12 James Greenhalgh Backport from mainline. @@ -635,7 +795,7 @@ 2013-07-31 Andreas Krebbel Backport from mainline - 2013-03-27 Andreas Krebbel + 2013-03-27 Andreas Krebbel * config/s390/s390.h (TARGET_FLT_EVAL_METHOD): Define. diff --git a/gcc-4_8-branch/gcc/DATESTAMP b/gcc-4_8-branch/gcc/DATESTAMP index 3e446dd4aca..661454921aa 100644 --- a/gcc-4_8-branch/gcc/DATESTAMP +++ b/gcc-4_8-branch/gcc/DATESTAMP @@ -1 +1 @@ -20131014 +20131111 diff --git a/gcc-4_8-branch/gcc/ada/ChangeLog b/gcc-4_8-branch/gcc/ada/ChangeLog index 05edeed6580..24479a3fb6f 100644 --- a/gcc-4_8-branch/gcc/ada/ChangeLog +++ b/gcc-4_8-branch/gcc/ada/ChangeLog @@ -1,3 +1,19 @@ +2013-10-19 Eric Botcazou + + * gcc-interface/utils.c (scale_by_factor_of): New function. + (rest_of_record_type_compilation): Use scale_by_factor_of in order to + scale the original offset for both rounding cases; in the second case, + take into accout the addend to compute the alignment. Tidy up. + +2013-10-19 Eric Botcazou + + * gcc-interface/utils.c (gnat_set_type_context): New function. + (gnat_pushdecl): Use it to set the context of the type. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-13 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment. diff --git a/gcc-4_8-branch/gcc/ada/gcc-interface/utils.c b/gcc-4_8-branch/gcc/ada/gcc-interface/utils.c index c5cee7a0098..ec252829c63 100644 --- a/gcc-4_8-branch/gcc/ada/gcc-interface/utils.c +++ b/gcc-4_8-branch/gcc/ada/gcc-interface/utils.c @@ -232,6 +232,7 @@ static tree compute_related_constant (tree, tree); static tree split_plus (tree, tree *); static tree float_type_for_precision (int, enum machine_mode); static tree convert_to_fat_pointer (tree, tree); +static unsigned int scale_by_factor_of (tree, unsigned int); static bool potential_alignment_gap (tree, tree, tree); static void process_attributes (tree, struct attrib *); @@ -532,6 +533,22 @@ gnat_zaplevel (void) free_binding_level = level; } +/* Set the context of TYPE and its parallel types (if any) to CONTEXT. */ + +static void +gnat_set_type_context (tree type, tree context) +{ + tree decl = TYPE_STUB_DECL (type); + + TYPE_CONTEXT (type) = context; + + while (decl && DECL_PARALLEL_TYPE (decl)) + { + TYPE_CONTEXT (DECL_PARALLEL_TYPE (decl)) = context; + decl = TYPE_STUB_DECL (DECL_PARALLEL_TYPE (decl)); + } +} + /* Record DECL as belonging to the current lexical scope and use GNAT_NODE for location information and flag propagation. */ @@ -613,7 +630,7 @@ gnat_pushdecl (tree decl, Node_Id gnat_node) if (TREE_CODE (t) == POINTER_TYPE) TYPE_NEXT_PTR_TO (t) = tt; TYPE_NAME (tt) = DECL_NAME (decl); - TYPE_CONTEXT (tt) = DECL_CONTEXT (decl); + gnat_set_type_context (tt, DECL_CONTEXT (decl)); TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (t); DECL_ORIGINAL_TYPE (decl) = tt; } @@ -623,7 +640,7 @@ gnat_pushdecl (tree decl, Node_Id gnat_node) /* We need a variant for the placeholder machinery to work. */ tree tt = build_variant_type_copy (t); TYPE_NAME (tt) = decl; - TYPE_CONTEXT (tt) = DECL_CONTEXT (decl); + gnat_set_type_context (tt, DECL_CONTEXT (decl)); TREE_USED (tt) = TREE_USED (t); TREE_TYPE (decl) = tt; if (DECL_ORIGINAL_TYPE (TYPE_NAME (t))) @@ -645,7 +662,7 @@ gnat_pushdecl (tree decl, Node_Id gnat_node) if (!(TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL)) { TYPE_NAME (t) = decl; - TYPE_CONTEXT (t) = DECL_CONTEXT (decl); + gnat_set_type_context (t, DECL_CONTEXT (decl)); } } } @@ -1692,93 +1709,74 @@ rest_of_record_type_compilation (tree record_type) TYPE_SIZE_UNIT (new_record_type) = size_int (TYPE_ALIGN (record_type) / BITS_PER_UNIT); - /* Now scan all the fields, replacing each field with a new - field corresponding to the new encoding. */ + /* Now scan all the fields, replacing each field with a new field + corresponding to the new encoding. */ for (old_field = TYPE_FIELDS (record_type); old_field; old_field = DECL_CHAIN (old_field)) { tree field_type = TREE_TYPE (old_field); tree field_name = DECL_NAME (old_field); - tree new_field; tree curpos = bit_position (old_field); + tree pos, new_field; bool var = false; unsigned int align = 0; - tree pos; - - /* See how the position was modified from the last position. - There are two basic cases we support: a value was added - to the last position or the last position was rounded to - a boundary and they something was added. Check for the - first case first. If not, see if there is any evidence - of rounding. If so, round the last position and try - again. + /* We're going to do some pattern matching below so remove as many + conversions as possible. */ + curpos = remove_conversions (curpos, true); - If this is a union, the position can be taken as zero. */ + /* See how the position was modified from the last position. - /* Some computations depend on the shape of the position expression, - so strip conversions to make sure it's exposed. */ - curpos = remove_conversions (curpos, true); + There are two basic cases we support: a value was added + to the last position or the last position was rounded to + a boundary and they something was added. Check for the + first case first. If not, see if there is any evidence + of rounding. If so, round the last position and retry. + If this is a union, the position can be taken as zero. */ if (TREE_CODE (new_record_type) == UNION_TYPE) - pos = bitsize_zero_node, align = 0; + pos = bitsize_zero_node; else pos = compute_related_constant (curpos, last_pos); - if (!pos && TREE_CODE (curpos) == MULT_EXPR + if (!pos + && TREE_CODE (curpos) == MULT_EXPR && host_integerp (TREE_OPERAND (curpos, 1), 1)) { tree offset = TREE_OPERAND (curpos, 0); align = tree_low_cst (TREE_OPERAND (curpos, 1), 1); - - /* An offset which is a bitwise AND with a mask increases the - alignment according to the number of trailing zeros. */ - offset = remove_conversions (offset, true); - if (TREE_CODE (offset) == BIT_AND_EXPR - && TREE_CODE (TREE_OPERAND (offset, 1)) == INTEGER_CST) - { - unsigned HOST_WIDE_INT mask - = TREE_INT_CST_LOW (TREE_OPERAND (offset, 1)); - unsigned int i; - - for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++) - { - if (mask & 1) - break; - mask >>= 1; - align *= 2; - } - } - - pos = compute_related_constant (curpos, - round_up (last_pos, align)); + align = scale_by_factor_of (offset, align); + last_pos = round_up (last_pos, align); + pos = compute_related_constant (curpos, last_pos); } - else if (!pos && TREE_CODE (curpos) == PLUS_EXPR - && TREE_CODE (TREE_OPERAND (curpos, 1)) == INTEGER_CST + else if (!pos + && TREE_CODE (curpos) == PLUS_EXPR + && host_integerp (TREE_OPERAND (curpos, 1), 1) && TREE_CODE (TREE_OPERAND (curpos, 0)) == MULT_EXPR - && host_integerp (TREE_OPERAND - (TREE_OPERAND (curpos, 0), 1), - 1)) + && host_integerp + (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1)) { + tree offset = TREE_OPERAND (TREE_OPERAND (curpos, 0), 0); + unsigned HOST_WIDE_INT addend + = tree_low_cst (TREE_OPERAND (curpos, 1), 1); align - = tree_low_cst - (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1); - pos = compute_related_constant (curpos, - round_up (last_pos, align)); + = tree_low_cst (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1); + align = scale_by_factor_of (offset, align); + align = MIN (align, addend & -addend); + last_pos = round_up (last_pos, align); + pos = compute_related_constant (curpos, last_pos); } - else if (potential_alignment_gap (prev_old_field, old_field, - pos)) + else if (potential_alignment_gap (prev_old_field, old_field, pos)) { align = TYPE_ALIGN (field_type); - pos = compute_related_constant (curpos, - round_up (last_pos, align)); + last_pos = round_up (last_pos, align); + pos = compute_related_constant (curpos, last_pos); } /* If we can't compute a position, set it to zero. - ??? We really should abort here, but it's too much work - to get this correct for all cases. */ - + ??? We really should abort here, but it's too much work + to get this correct for all cases. */ if (!pos) pos = bitsize_zero_node; @@ -2553,6 +2551,32 @@ value_factor_p (tree value, HOST_WIDE_INT factor) return false; } +/* Return VALUE scaled by the biggest power-of-2 factor of EXPR. */ + +static unsigned int +scale_by_factor_of (tree expr, unsigned int value) +{ + expr = remove_conversions (expr, true); + + /* An expression which is a bitwise AND with a mask has a power-of-2 factor + corresponding to the number of trailing zeros of the mask. */ + if (TREE_CODE (expr) == BIT_AND_EXPR + && TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST) + { + unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (TREE_OPERAND (expr, 1)); + unsigned int i = 0; + + while ((mask & 1) == 0 && i < HOST_BITS_PER_WIDE_INT) + { + mask >>= 1; + value *= 2; + i++; + } + } + + return value; +} + /* Given two consecutive field decls PREV_FIELD and CURR_FIELD, return true unless we can prove these 2 fields are laid out in such a way that no gap exist between the end of PREV_FIELD and the beginning of CURR_FIELD. OFFSET diff --git a/gcc-4_8-branch/gcc/alias.c b/gcc-4_8-branch/gcc/alias.c index 970bdb0ee9a..aa404a7ab49 100644 --- a/gcc-4_8-branch/gcc/alias.c +++ b/gcc-4_8-branch/gcc/alias.c @@ -2871,16 +2871,13 @@ init_alias_analysis (void) /* Wipe the reg_seen array clean. */ bitmap_clear (reg_seen); - /* Mark all hard registers which may contain an address. - The stack, frame and argument pointers may contain an address. - An argument register which can hold a Pmode value may contain - an address even if it is not in BASE_REGS. - - The address expression is VOIDmode for an argument and - Pmode for other registers. */ - - memcpy (new_reg_base_value, static_reg_base_value, - FIRST_PSEUDO_REGISTER * sizeof (rtx)); + /* Initialize the alias information for this pass. */ + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (static_reg_base_value[i]) + { + new_reg_base_value[i] = static_reg_base_value[i]; + bitmap_set_bit (reg_seen, i); + } /* Walk the insns adding values to the new_reg_base_value array. */ for (i = 0; i < rpo_cnt; i++) diff --git a/gcc-4_8-branch/gcc/c-family/ChangeLog b/gcc-4_8-branch/gcc/c-family/ChangeLog index dd917ae1cca..f2d18bcc4a2 100644 --- a/gcc-4_8-branch/gcc/c-family/ChangeLog +++ b/gcc-4_8-branch/gcc/c-family/ChangeLog @@ -1,3 +1,15 @@ +2013-11-04 Marek Polacek + + Backport from mainline + 2013-11-04 Marek Polacek + + PR c++/58979 + * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-08-09 Arnaud Charlet * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name diff --git a/gcc-4_8-branch/gcc/c-family/c-common.c b/gcc-4_8-branch/gcc/c-family/c-common.c index 0d91cc3cfdf..471572081e7 100644 --- a/gcc-4_8-branch/gcc/c-family/c-common.c +++ b/gcc-4_8-branch/gcc/c-family/c-common.c @@ -9763,6 +9763,11 @@ invalid_indirection_error (location_t loc, tree type, ref_operator errstring) "invalid type argument of %<->%> (have %qT)", type); break; + case RO_ARROW_STAR: + error_at (loc, + "invalid type argument of %<->*%> (have %qT)", + type); + break; case RO_IMPLICIT_CONVERSION: error_at (loc, "invalid type argument of implicit conversion (have %qT)", diff --git a/gcc-4_8-branch/gcc/c/ChangeLog b/gcc-4_8-branch/gcc/c/ChangeLog index 32410a3c3f9..e9449eee6b9 100644 --- a/gcc-4_8-branch/gcc/c/ChangeLog +++ b/gcc-4_8-branch/gcc/c/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/gcc/cfgexpand.c b/gcc-4_8-branch/gcc/cfgexpand.c index 5acc42d73f5..5cc9c34f568 100644 --- a/gcc-4_8-branch/gcc/cfgexpand.c +++ b/gcc-4_8-branch/gcc/cfgexpand.c @@ -4707,14 +4707,18 @@ gimple_expand_cfg (void) if (e->insns.r) { rebuild_jump_labels_chain (e->insns.r); - /* Avoid putting insns before parm_birth_insn. */ + /* Put insns after parm birth, but before + NOTE_INSNS_FUNCTION_BEG. */ if (e->src == ENTRY_BLOCK_PTR - && single_succ_p (ENTRY_BLOCK_PTR) - && parm_birth_insn) + && single_succ_p (ENTRY_BLOCK_PTR)) { rtx insns = e->insns.r; e->insns.r = NULL_RTX; - emit_insn_after_noloc (insns, parm_birth_insn, e->dest); + if (NOTE_P (parm_birth_insn) + && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG) + emit_insn_before_noloc (insns, parm_birth_insn, e->dest); + else + emit_insn_after_noloc (insns, parm_birth_insn, e->dest); } else commit_one_edge_insertion (e); diff --git a/gcc-4_8-branch/gcc/cgraph.c b/gcc-4_8-branch/gcc/cgraph.c index 8c1efb4c37a..fd3aadee45d 100644 --- a/gcc-4_8-branch/gcc/cgraph.c +++ b/gcc-4_8-branch/gcc/cgraph.c @@ -2596,4 +2596,47 @@ verify_cgraph (void) FOR_EACH_FUNCTION (node) verify_cgraph_node (node); } + +/* Create external decl node for DECL. + The difference i nbetween cgraph_get_create_node and + cgraph_get_create_real_symbol_node is that cgraph_get_create_node + may return inline clone, while cgraph_get_create_real_symbol_node + will create a new node in this case. + FIXME: This function should be removed once clones are put out of decl + hash. */ + +struct cgraph_node * +cgraph_get_create_real_symbol_node (tree decl) +{ + struct cgraph_node *first_clone = cgraph_get_node (decl); + struct cgraph_node *node; + /* create symbol table node. even if inline clone exists, we can not take + it as a target of non-inlined call. */ + node = cgraph_get_node (decl); + if (node && !node->global.inlined_to) + return node; + + node = cgraph_create_node (decl); + + /* ok, we previously inlined the function, then removed the offline copy and + now we want it back for external call. this can happen when devirtualizing + while inlining function called once that happens after extern inlined and + virtuals are already removed. in this case introduce the external node + and make it available for call. */ + if (first_clone) + { + first_clone->clone_of = node; + node->clones = first_clone; + symtab_prevail_in_asm_name_hash ((symtab_node) node); + symtab_insert_node_to_hashtable ((symtab_node) node); + if (dump_file) + fprintf (dump_file, "Introduced new external node " + "(%s/%i) and turned into root of the clone tree.\n", + xstrdup (cgraph_node_name (node)), node->uid); + } + else if (dump_file) + fprintf (dump_file, "Introduced new external node " + "(%s/%i).\n", xstrdup (cgraph_node_name (node)), node->uid); + return node; +} #include "gt-cgraph.h" diff --git a/gcc-4_8-branch/gcc/cgraph.h b/gcc-4_8-branch/gcc/cgraph.h index 5df7fb478b4..8ab7ae18102 100644 --- a/gcc-4_8-branch/gcc/cgraph.h +++ b/gcc-4_8-branch/gcc/cgraph.h @@ -575,6 +575,7 @@ struct cgraph_indirect_call_info *cgraph_allocate_init_indirect_info (void); struct cgraph_node * cgraph_create_node (tree); struct cgraph_node * cgraph_create_empty_node (void); struct cgraph_node * cgraph_get_create_node (tree); +struct cgraph_node * cgraph_get_create_real_symbol_node (tree); struct cgraph_node * cgraph_same_body_alias (struct cgraph_node *, tree, tree); struct cgraph_node * cgraph_add_thunk (struct cgraph_node *, tree, tree, bool, HOST_WIDE_INT, HOST_WIDE_INT, tree, tree); diff --git a/gcc-4_8-branch/gcc/cgraphbuild.c b/gcc-4_8-branch/gcc/cgraphbuild.c index fb01f24ec07..a74a4c043e3 100644 --- a/gcc-4_8-branch/gcc/cgraphbuild.c +++ b/gcc-4_8-branch/gcc/cgraphbuild.c @@ -73,7 +73,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data) decl = get_base_var (*tp); if (TREE_CODE (decl) == FUNCTION_DECL) { - struct cgraph_node *node = cgraph_get_create_node (decl); + struct cgraph_node *node = cgraph_get_create_real_symbol_node (decl); if (!ctx->only_vars) cgraph_mark_address_taken_node (node); ipa_record_reference ((symtab_node)ctx->varpool_node, @@ -143,7 +143,7 @@ record_eh_tables (struct cgraph_node *node, struct function *fun) { struct cgraph_node *per_node; - per_node = cgraph_get_create_node (DECL_FUNCTION_PERSONALITY (node->symbol.decl)); + per_node = cgraph_get_create_real_symbol_node (DECL_FUNCTION_PERSONALITY (node->symbol.decl)); ipa_record_reference ((symtab_node)node, (symtab_node)per_node, IPA_REF_ADDR, NULL); cgraph_mark_address_taken_node (per_node); } @@ -223,7 +223,7 @@ mark_address (gimple stmt, tree addr, void *data) addr = get_base_address (addr); if (TREE_CODE (addr) == FUNCTION_DECL) { - struct cgraph_node *node = cgraph_get_create_node (addr); + struct cgraph_node *node = cgraph_get_create_real_symbol_node (addr); cgraph_mark_address_taken_node (node); ipa_record_reference ((symtab_node)data, (symtab_node)node, @@ -252,7 +252,7 @@ mark_load (gimple stmt, tree t, void *data) { /* ??? This can happen on platforms with descriptors when these are directly manipulated in the code. Pretend that it's an address. */ - struct cgraph_node *node = cgraph_get_create_node (t); + struct cgraph_node *node = cgraph_get_create_real_symbol_node (t); cgraph_mark_address_taken_node (node); ipa_record_reference ((symtab_node)data, (symtab_node)node, @@ -330,7 +330,7 @@ build_cgraph_edges (void) { tree fn = gimple_omp_parallel_child_fn (stmt); ipa_record_reference ((symtab_node)node, - (symtab_node)cgraph_get_create_node (fn), + (symtab_node)cgraph_get_create_real_symbol_node (fn), IPA_REF_ADDR, stmt); } if (gimple_code (stmt) == GIMPLE_OMP_TASK) @@ -338,12 +338,12 @@ build_cgraph_edges (void) tree fn = gimple_omp_task_child_fn (stmt); if (fn) ipa_record_reference ((symtab_node)node, - (symtab_node) cgraph_get_create_node (fn), + (symtab_node) cgraph_get_create_real_symbol_node (fn), IPA_REF_ADDR, stmt); fn = gimple_omp_task_copy_fn (stmt); if (fn) ipa_record_reference ((symtab_node)node, - (symtab_node)cgraph_get_create_node (fn), + (symtab_node)cgraph_get_create_real_symbol_node (fn), IPA_REF_ADDR, stmt); } } diff --git a/gcc-4_8-branch/gcc/combine.c b/gcc-4_8-branch/gcc/combine.c index 68608321479..c9ce596f202 100644 --- a/gcc-4_8-branch/gcc/combine.c +++ b/gcc-4_8-branch/gcc/combine.c @@ -5798,8 +5798,15 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest, return x; } - /* If the code changed, return a whole new comparison. */ - if (new_code != code) + /* If the code changed, return a whole new comparison. + We also need to avoid using SUBST in cases where + simplify_comparison has widened a comparison with a CONST_INT, + since in that case the wider CONST_INT may fail the sanity + checks in do_SUBST. */ + if (new_code != code + || (CONST_INT_P (op1) + && GET_MODE (op0) != GET_MODE (XEXP (x, 0)) + && GET_MODE (op0) != GET_MODE (XEXP (x, 1)))) return gen_rtx_fmt_ee (new_code, mode, op0, op1); /* Otherwise, keep this operation, but maybe change its operands. diff --git a/gcc-4_8-branch/gcc/config/i386/i386.c b/gcc-4_8-branch/gcc/config/i386/i386.c index 8475883823b..65b2767ba52 100644 --- a/gcc-4_8-branch/gcc/config/i386/i386.c +++ b/gcc-4_8-branch/gcc/config/i386/i386.c @@ -2983,7 +2983,7 @@ ix86_option_override_internal (bool main_args_p) {"bdver3", PROCESSOR_BDVER3, CPU_BDVER3, PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 - | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX + | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4 | PTA_XOP | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C | PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT}, @@ -7235,9 +7235,15 @@ ix86_function_value_regno_p (const unsigned int regno) switch (regno) { case AX_REG: + case DX_REG: return true; + case DI_REG: + case SI_REG: + return TARGET_64BIT && ix86_abi != MS_ABI; - case FIRST_FLOAT_REG: + /* Complex values are returned in %st(0)/%st(1) pair. */ + case ST0_REG: + case ST1_REG: /* TODO: The function should depend on current function ABI but builtins.c would need updating then. Therefore we use the default ABI. */ @@ -7245,10 +7251,12 @@ ix86_function_value_regno_p (const unsigned int regno) return false; return TARGET_FLOAT_RETURNS_IN_80387; - case FIRST_SSE_REG: + /* Complex values are returned in %xmm0/%xmm1 pair. */ + case XMM0_REG: + case XMM1_REG: return TARGET_SSE; - case FIRST_MMX_REG: + case MM0_REG: if (TARGET_MACHO || TARGET_64BIT) return false; return TARGET_MMX; @@ -13817,8 +13825,6 @@ put_condition_code (enum rtx_code code, enum machine_mode mode, bool reverse, Those same assemblers have the same but opposite lossage on cmov. */ if (mode == CCmode) suffix = fp ? "nbe" : "a"; - else if (mode == CCCmode) - suffix = "b"; else gcc_unreachable (); break; @@ -13840,8 +13846,12 @@ put_condition_code (enum rtx_code code, enum machine_mode mode, bool reverse, } break; case LTU: - gcc_assert (mode == CCmode || mode == CCCmode); - suffix = "b"; + if (mode == CCmode) + suffix = "b"; + else if (mode == CCCmode) + suffix = "c"; + else + gcc_unreachable (); break; case GE: switch (mode) @@ -13861,20 +13871,20 @@ put_condition_code (enum rtx_code code, enum machine_mode mode, bool reverse, } break; case GEU: - /* ??? As above. */ - gcc_assert (mode == CCmode || mode == CCCmode); - suffix = fp ? "nb" : "ae"; + if (mode == CCmode) + suffix = fp ? "nb" : "ae"; + else if (mode == CCCmode) + suffix = "nc"; + else + gcc_unreachable (); break; case LE: gcc_assert (mode == CCmode || mode == CCGCmode || mode == CCNOmode); suffix = "le"; break; case LEU: - /* ??? As above. */ if (mode == CCmode) suffix = "be"; - else if (mode == CCCmode) - suffix = fp ? "nb" : "ae"; else gcc_unreachable (); break; @@ -18486,12 +18496,7 @@ ix86_cc_mode (enum rtx_code code, rtx op0, rtx op1) return CCmode; case GTU: /* CF=0 & ZF=0 */ case LEU: /* CF=1 | ZF=1 */ - /* Detect overflow checks. They need just the carry flag. */ - if (GET_CODE (op0) == MINUS - && rtx_equal_p (op1, XEXP (op0, 0))) - return CCCmode; - else - return CCmode; + return CCmode; /* Codes possibly doable only with sign flag when comparing against zero. */ case GE: /* SF=OF or SF=0 */ @@ -21740,6 +21745,21 @@ counter_mode (rtx count_exp) return SImode; } +/* Copy the address to a Pmode register. This is used for x32 to + truncate DImode TLS address to a SImode register. */ + +static rtx +ix86_copy_addr_to_reg (rtx addr) +{ + if (GET_MODE (addr) == Pmode) + return copy_addr_to_reg (addr); + else + { + gcc_assert (GET_MODE (addr) == DImode && Pmode == SImode); + return gen_rtx_SUBREG (SImode, copy_to_mode_reg (DImode, addr), 0); + } +} + /* When SRCPTR is non-NULL, output simple loop to move memory pointer to SRCPTR to DESTPTR via chunks of MODE unrolled UNROLL times, overall size is COUNT specified in bytes. When SRCPTR is NULL, output the @@ -22728,8 +22748,8 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp, gcc_assert (alg != no_stringop); if (!count) count_exp = copy_to_mode_reg (GET_MODE (count_exp), count_exp); - destreg = copy_addr_to_reg (XEXP (dst, 0)); - srcreg = copy_addr_to_reg (XEXP (src, 0)); + destreg = ix86_copy_addr_to_reg (XEXP (dst, 0)); + srcreg = ix86_copy_addr_to_reg (XEXP (src, 0)); switch (alg) { case libcall: @@ -23119,7 +23139,7 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp, gcc_assert (alg != no_stringop); if (!count) count_exp = copy_to_mode_reg (counter_mode (count_exp), count_exp); - destreg = copy_addr_to_reg (XEXP (dst, 0)); + destreg = ix86_copy_addr_to_reg (XEXP (dst, 0)); switch (alg) { case libcall: diff --git a/gcc-4_8-branch/gcc/config/i386/i386.md b/gcc-4_8-branch/gcc/config/i386/i386.md index 4d5b2872d09..6cc9978df81 100644 --- a/gcc-4_8-branch/gcc/config/i386/i386.md +++ b/gcc-4_8-branch/gcc/config/i386/i386.md @@ -1570,7 +1570,7 @@ split_double_mode (DImode, &operands[1], 1, &operands[2], &operands[3]); operands[1] = gen_lowpart (DImode, operands[2]); - operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx, + operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (4))); }) @@ -1587,7 +1587,7 @@ split_double_mode (DImode, &operands[1], 1, &operands[2], &operands[3]); operands[1] = gen_lowpart (DImode, operands[2]); - operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx, + operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (4))); }) @@ -6589,7 +6589,7 @@ (set_attr "use_carry" "1") (set_attr "mode" "")]) -;; Overflow setting add and subtract instructions +;; Overflow setting add instructions (define_insn "*add3_cconly_overflow" [(set (reg:CCC FLAGS_REG) @@ -6604,43 +6604,31 @@ [(set_attr "type" "alu") (set_attr "mode" "")]) -(define_insn "*sub3_cconly_overflow" +(define_insn "*add3_cc_overflow" [(set (reg:CCC FLAGS_REG) (compare:CCC - (minus:SWI - (match_operand:SWI 0 "nonimmediate_operand" "m,") - (match_operand:SWI 1 "" ",m")) - (match_dup 0)))] - "" - "cmp{}\t{%1, %0|%0, %1}" - [(set_attr "type" "icmp") - (set_attr "mode" "")]) - -(define_insn "*3_cc_overflow" - [(set (reg:CCC FLAGS_REG) - (compare:CCC - (plusminus:SWI - (match_operand:SWI 1 "nonimmediate_operand" "0,0") + (plus:SWI + (match_operand:SWI 1 "nonimmediate_operand" "%0,0") (match_operand:SWI 2 "" ",m")) (match_dup 1))) (set (match_operand:SWI 0 "nonimmediate_operand" "=m,") - (plusminus:SWI (match_dup 1) (match_dup 2)))] - "ix86_binary_operator_ok (, mode, operands)" - "{}\t{%2, %0|%0, %2}" + (plus:SWI (match_dup 1) (match_dup 2)))] + "ix86_binary_operator_ok (PLUS, mode, operands)" + "add{}\t{%2, %0|%0, %2}" [(set_attr "type" "alu") (set_attr "mode" "")]) -(define_insn "*si3_zext_cc_overflow" +(define_insn "*addsi3_zext_cc_overflow" [(set (reg:CCC FLAGS_REG) (compare:CCC - (plusminus:SI - (match_operand:SI 1 "nonimmediate_operand" "0") + (plus:SI + (match_operand:SI 1 "nonimmediate_operand" "%0") (match_operand:SI 2 "x86_64_general_operand" "rme")) (match_dup 1))) (set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI (plusminus:SI (match_dup 1) (match_dup 2))))] - "TARGET_64BIT && ix86_binary_operator_ok (, SImode, operands)" - "{l}\t{%2, %k0|%k0, %2}" + (zero_extend:DI (plus:SI (match_dup 1) (match_dup 2))))] + "TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)" + "add{l}\t{%2, %k0|%k0, %2}" [(set_attr "type" "alu") (set_attr "mode" "SI")]) diff --git a/gcc-4_8-branch/gcc/config/i386/t-rtems b/gcc-4_8-branch/gcc/config/i386/t-rtems index 6161ec10090..fef4c22e9c1 100644 --- a/gcc-4_8-branch/gcc/config/i386/t-rtems +++ b/gcc-4_8-branch/gcc/config/i386/t-rtems @@ -17,11 +17,10 @@ # . # -MULTILIB_OPTIONS = mtune=i486/mtune=pentium/mtune=pentiumpro \ -msoft-float +MULTILIB_OPTIONS = mtune=i486/mtune=pentium/mtune=pentiumpro msoft-float MULTILIB_DIRNAMES= m486 mpentium mpentiumpro soft-float -MULTILIB_MATCHES = msoft-float=mno-m80387 -MULTILIB_MATCHES += mtune?pentium=mtune?k6 mtune?pentiumpro=mtune?mathlon +MULTILIB_MATCHES = msoft-float=mno-80387 +MULTILIB_MATCHES += mtune?pentium=mtune?k6 mtune?pentiumpro=mtune?athlon MULTILIB_EXCEPTIONS = \ mtune=pentium/*msoft-float* \ mtune=pentiumpro/*msoft-float* diff --git a/gcc-4_8-branch/gcc/config/rs6000/rs6000.md b/gcc-4_8-branch/gcc/config/rs6000/rs6000.md index ade39ea5f90..fe7d2fd5520 100644 --- a/gcc-4_8-branch/gcc/config/rs6000/rs6000.md +++ b/gcc-4_8-branch/gcc/config/rs6000/rs6000.md @@ -2412,7 +2412,7 @@ (match_operand:SI 2 "gpc_reg_operand" "r,r")) (const_int 0))) (clobber (match_scratch:SI 3 "=r,r"))] - "" + "TARGET_32BIT" "@ mullw. %3,%1,%2 #" @@ -2425,7 +2425,7 @@ (match_operand:SI 2 "gpc_reg_operand" "")) (const_int 0))) (clobber (match_scratch:SI 3 ""))] - "reload_completed" + "TARGET_32BIT && reload_completed" [(set (match_dup 3) (mult:SI (match_dup 1) (match_dup 2))) (set (match_dup 0) @@ -2440,7 +2440,7 @@ (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (mult:SI (match_dup 1) (match_dup 2)))] - "" + "TARGET_32BIT" "@ mullw. %0,%1,%2 #" @@ -2454,7 +2454,7 @@ (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (mult:SI (match_dup 1) (match_dup 2)))] - "reload_completed" + "TARGET_32BIT && reload_completed" [(set (match_dup 0) (mult:SI (match_dup 1) (match_dup 2))) (set (match_dup 3) diff --git a/gcc-4_8-branch/gcc/config/sh/sh.opt b/gcc-4_8-branch/gcc/config/sh/sh.opt index c314e144c21..8a6788eb3d1 100644 --- a/gcc-4_8-branch/gcc/config/sh/sh.opt +++ b/gcc-4_8-branch/gcc/config/sh/sh.opt @@ -21,7 +21,7 @@ ;; Used for various architecture options. Mask(SH_E) -;; Set if the default precision of th FPU is single. +;; Set if the default precision of the FPU is single. Mask(FPU_SINGLE) ;; Set if the a double-precision FPU is present but is restricted to diff --git a/gcc-4_8-branch/gcc/configure b/gcc-4_8-branch/gcc/configure index fbdcd89b70a..783fe2b572a 100755 --- a/gcc-4_8-branch/gcc/configure +++ b/gcc-4_8-branch/gcc/configure @@ -27241,8 +27241,8 @@ if test x"$enable_plugin" = x"yes"; then $as_echo_n "checking for exported symbols... " >&6; } if test "x$export_sym_check" != x; then echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c - ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 - if $export_sym_check conftest | grep foobar > /dev/null; then + ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then : # No need to use a flag { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -27251,8 +27251,8 @@ $as_echo "yes" >&6; } $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5 $as_echo_n "checking for -rdynamic... " >&6; } - ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 - if $export_sym_check conftest | grep foobar > /dev/null; then + ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then plugin_rdynamic=yes pluginlibs="-rdynamic" else diff --git a/gcc-4_8-branch/gcc/configure.ac b/gcc-4_8-branch/gcc/configure.ac index 773cb5d4848..64dd9f77f8f 100644 --- a/gcc-4_8-branch/gcc/configure.ac +++ b/gcc-4_8-branch/gcc/configure.ac @@ -5194,15 +5194,15 @@ if test x"$enable_plugin" = x"yes"; then AC_MSG_CHECKING([for exported symbols]) if test "x$export_sym_check" != x; then echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c - ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 - if $export_sym_check conftest | grep foobar > /dev/null; then + ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then : # No need to use a flag AC_MSG_RESULT([yes]) else AC_MSG_RESULT([yes]) AC_MSG_CHECKING([for -rdynamic]) - ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 - if $export_sym_check conftest | grep foobar > /dev/null; then + ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then plugin_rdynamic=yes pluginlibs="-rdynamic" else diff --git a/gcc-4_8-branch/gcc/cp/ChangeLog b/gcc-4_8-branch/gcc/cp/ChangeLog index b01f2af9e54..1e8579e8362 100644 --- a/gcc-4_8-branch/gcc/cp/ChangeLog +++ b/gcc-4_8-branch/gcc/cp/ChangeLog @@ -1,3 +1,30 @@ +2013-10-25 Tom de Vries + + PR c++/58282 + * except.c (build_must_not_throw_expr): Handle + flag_exceptions. + +2013-10-17 Paolo Carlini + + PR c++/58596 + * semantics.c (lambda_expr_this_capture): Handle NSDMIs in the + cp_unevaluated_operand case. + +2013-10-16 Paolo Carlini + + PR c++/58633 + * parser.c (cp_parser_pseudo_destructor_name): Revert r174385 changes. + +2013-10-16 Jason Merrill + + PR c++/57850 + * decl2.c (dump_tu): Split out from... + (cp_write_global_declarations): ...here. Call it in PCH mode. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-08 Paolo Carlini PR c++/58568 diff --git a/gcc-4_8-branch/gcc/cp/decl2.c b/gcc-4_8-branch/gcc/cp/decl2.c index 628be934bff..9252233fe82 100644 --- a/gcc-4_8-branch/gcc/cp/decl2.c +++ b/gcc-4_8-branch/gcc/cp/decl2.c @@ -3960,6 +3960,22 @@ handle_tls_init (void) expand_or_defer_fn (finish_function (0)); } +/* The entire file is now complete. If requested, dump everything + to a file. */ + +static void +dump_tu (void) +{ + int flags; + FILE *stream = dump_begin (TDI_tu, &flags); + + if (stream) + { + dump_node (global_namespace, flags & ~TDF_SLIM, stream); + dump_end (TDI_tu, stream); + } +} + /* This routine is called at the end of compilation. Its job is to create all the code needed to initialize and destroy the global aggregates. We do the destruction @@ -3990,6 +4006,7 @@ cp_write_global_declarations (void) if (pch_file) { c_common_write_pch (); + dump_tu (); return; } @@ -4359,16 +4376,7 @@ cp_write_global_declarations (void) /* The entire file is now complete. If requested, dump everything to a file. */ - { - int flags; - FILE *stream = dump_begin (TDI_tu, &flags); - - if (stream) - { - dump_node (global_namespace, flags & ~TDF_SLIM, stream); - dump_end (TDI_tu, stream); - } - } + dump_tu (); if (flag_detailed_statistics) { diff --git a/gcc-4_8-branch/gcc/cp/except.c b/gcc-4_8-branch/gcc/cp/except.c index 216ec103f52..604f274fb97 100644 --- a/gcc-4_8-branch/gcc/cp/except.c +++ b/gcc-4_8-branch/gcc/cp/except.c @@ -380,6 +380,9 @@ build_must_not_throw_expr (tree body, tree cond) { tree type = body ? TREE_TYPE (body) : void_type_node; + if (!flag_exceptions) + return body; + if (cond && !value_dependent_expression_p (cond)) { cond = cxx_constant_value (cond); diff --git a/gcc-4_8-branch/gcc/cp/parser.c b/gcc-4_8-branch/gcc/cp/parser.c index b6322788fae..5b058d87cde 100644 --- a/gcc-4_8-branch/gcc/cp/parser.c +++ b/gcc-4_8-branch/gcc/cp/parser.c @@ -6421,10 +6421,6 @@ cp_parser_pseudo_destructor_name (cp_parser* parser, /* Look for the `~'. */ cp_parser_require (parser, CPP_COMPL, RT_COMPL); - /* Once we see the ~, this has to be a pseudo-destructor. */ - if (!processing_template_decl && !cp_parser_error_occurred (parser)) - cp_parser_commit_to_tentative_parse (parser); - /* Look for the type-name again. We are not responsible for checking that it matches the first type-name. */ *type = cp_parser_nonclass_name (parser); diff --git a/gcc-4_8-branch/gcc/cp/semantics.c b/gcc-4_8-branch/gcc/cp/semantics.c index 580c609ac9c..571fc7c6745 100644 --- a/gcc-4_8-branch/gcc/cp/semantics.c +++ b/gcc-4_8-branch/gcc/cp/semantics.c @@ -9481,7 +9481,14 @@ lambda_expr_this_capture (tree lambda) /* In unevaluated context this isn't an odr-use, so just return the nearest 'this'. */ if (cp_unevaluated_operand) - return lookup_name (this_identifier); + { + /* In an NSDMI the fake 'this' pointer that we're using for + parsing is in scope_chain. */ + if (LAMBDA_EXPR_EXTRA_SCOPE (lambda) + && TREE_CODE (LAMBDA_EXPR_EXTRA_SCOPE (lambda)) == FIELD_DECL) + return scope_chain->x_current_class_ptr; + return lookup_name (this_identifier); + } /* Try to default capture 'this' if we can. */ if (!this_capture diff --git a/gcc-4_8-branch/gcc/fortran/ChangeLog b/gcc-4_8-branch/gcc/fortran/ChangeLog index 2f623b6b864..58bbc7fdd8c 100644 --- a/gcc-4_8-branch/gcc/fortran/ChangeLog +++ b/gcc-4_8-branch/gcc/fortran/ChangeLog @@ -1,3 +1,22 @@ +2013-11-05 Steven G. Kargl + + PR fortran/58989 + * check.c (gfc_check_reshape): ensure that shape is a constant + expression. + +2013-11-02 Janus Weil + + Backport from mainline + 2013-09-23 Janus Weil + + PR fortran/58355 + * decl.c (check_extended_derived_type): Prevent segfault, modify error + message. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-04 Tobias Burnus Backport from mainline diff --git a/gcc-4_8-branch/gcc/fortran/check.c b/gcc-4_8-branch/gcc/fortran/check.c index 586adee8b34..c9520f628ea 100644 --- a/gcc-4_8-branch/gcc/fortran/check.c +++ b/gcc-4_8-branch/gcc/fortran/check.c @@ -3208,7 +3208,7 @@ gfc_check_reshape (gfc_expr *source, gfc_expr *shape, "than %d elements", &shape->where, GFC_MAX_DIMENSIONS); return FAILURE; } - else if (shape->expr_type == EXPR_ARRAY) + else if (shape->expr_type == EXPR_ARRAY && gfc_is_constant_expr (shape)) { gfc_expr *e; int i, extent; diff --git a/gcc-4_8-branch/gcc/fortran/decl.c b/gcc-4_8-branch/gcc/fortran/decl.c index 72c511c8b24..b748cfd9561 100644 --- a/gcc-4_8-branch/gcc/fortran/decl.c +++ b/gcc-4_8-branch/gcc/fortran/decl.c @@ -7384,6 +7384,7 @@ syntax: /* Check a derived type that is being extended. */ + static gfc_symbol* check_extended_derived_type (char *name) { @@ -7395,14 +7396,15 @@ check_extended_derived_type (char *name) return NULL; } + extended = gfc_find_dt_in_generic (extended); + + /* F08:C428. */ if (!extended) { - gfc_error ("No such symbol in TYPE definition at %C"); + gfc_error ("Symbol '%s' at %C has not been previously defined", name); return NULL; } - extended = gfc_find_dt_in_generic (extended); - if (extended->attr.flavor != FL_DERIVED) { gfc_error ("'%s' in EXTENDS expression at %C is not a " diff --git a/gcc-4_8-branch/gcc/gimple-fold.c b/gcc-4_8-branch/gcc/gimple-fold.c index 738d7fddd4c..1de281a97d5 100644 --- a/gcc-4_8-branch/gcc/gimple-fold.c +++ b/gcc-4_8-branch/gcc/gimple-fold.c @@ -178,7 +178,7 @@ canonicalize_constructor_val (tree cval, tree from_decl) /* Make sure we create a cgraph node for functions we'll reference. They can be non-existent if the reference comes from an entry of an external vtable for example. */ - cgraph_get_create_node (base); + cgraph_get_create_real_symbol_node (base); } /* Fixup types in global initializers. */ if (TREE_TYPE (TREE_TYPE (cval)) != TREE_TYPE (TREE_OPERAND (cval, 0))) diff --git a/gcc-4_8-branch/gcc/go/ChangeLog b/gcc-4_8-branch/gcc/go/ChangeLog index 0a423810851..416d9235551 100644 --- a/gcc-4_8-branch/gcc/go/ChangeLog +++ b/gcc-4_8-branch/gcc/go/ChangeLog @@ -1,3 +1,21 @@ +2013-10-16 Ian Lance Taylor + + Bring in from mainline: + + 2013-10-11 Chris Manghane + * go-gcc.cc (Gcc_backend::function_code_expression): New + function. + + 2013-10-10 Chris Manghane + * go-gcc.cc (Backend::error_function): New function. + (Backend::function): New function. + (Backend::make_function): New function. + (function_to_tree): New function. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-04 Chris Manghane * go-gcc.cc (Backend::convert_expression): New function. diff --git a/gcc-4_8-branch/gcc/go/go-gcc.cc b/gcc-4_8-branch/gcc/go/go-gcc.cc index fcfd41b34ab..81e9ad18610 100644 --- a/gcc-4_8-branch/gcc/go/go-gcc.cc +++ b/gcc-4_8-branch/gcc/go/go-gcc.cc @@ -232,6 +232,9 @@ class Gcc_backend : public Backend Bexpression* convert_expression(Btype* type, Bexpression* expr, Location); + Bexpression* + function_code_expression(Bfunction*, Location); + // Statements. Bstatement* @@ -334,6 +337,17 @@ class Gcc_backend : public Backend Bexpression* label_address(Blabel*, Location); + // Functions. + + Bfunction* + error_function() + { return this->make_function(error_mark_node); } + + Bfunction* + function(Btype* fntype, const std::string& name, const std::string& asm_name, + bool is_visible, bool is_declaration, bool is_inlinable, + bool disable_split_stack, bool in_unique_section, Location); + private: // Make a Bexpression from a tree. Bexpression* @@ -350,6 +364,10 @@ class Gcc_backend : public Backend make_type(tree t) { return new Btype(t); } + Bfunction* + make_function(tree t) + { return new Bfunction(t); } + Btype* fill_in_struct(Btype*, const std::vector&); @@ -966,6 +984,19 @@ Gcc_backend::convert_expression(Btype* type, Bexpression* expr, Location) return tree_to_expr(ret); } +// Get the address of a function. + +Bexpression* +Gcc_backend::function_code_expression(Bfunction* bfunc, Location location) +{ + tree func = bfunc->get_tree(); + if (func == error_mark_node) + return this->error_expression(); + + tree ret = build_fold_addr_expr_loc(location.gcc_location(), func); + return this->make_expression(ret); +} + // An expression as a statement. Bstatement* @@ -1724,6 +1755,56 @@ Gcc_backend::label_address(Blabel* label, Location location) return this->make_expression(ret); } +// Declare or define a new function. + +Bfunction* +Gcc_backend::function(Btype* fntype, const std::string& name, + const std::string& asm_name, bool is_visible, + bool is_declaration, bool is_inlinable, + bool disable_split_stack, bool in_unique_section, + Location location) +{ + tree functype = fntype->get_tree(); + if (functype != error_mark_node) + { + gcc_assert(FUNCTION_POINTER_TYPE_P(functype)); + functype = TREE_TYPE(functype); + } + tree id = get_identifier_from_string(name); + if (functype == error_mark_node || id == error_mark_node) + return this->error_function(); + + tree decl = build_decl(location.gcc_location(), FUNCTION_DECL, id, functype); + if (!asm_name.empty()) + SET_DECL_ASSEMBLER_NAME(decl, get_identifier_from_string(asm_name)); + if (is_visible) + TREE_PUBLIC(decl) = 1; + if (is_declaration) + DECL_EXTERNAL(decl) = 1; + else + { + tree restype = TREE_TYPE(functype); + tree resdecl = + build_decl(location.gcc_location(), RESULT_DECL, NULL_TREE, restype); + DECL_ARTIFICIAL(resdecl) = 1; + DECL_IGNORED_P(resdecl) = 1; + DECL_CONTEXT(resdecl) = decl; + DECL_RESULT(decl) = resdecl; + } + if (!is_inlinable) + DECL_UNINLINABLE(decl) = 1; + if (disable_split_stack) + { + tree attr = get_identifier("__no_split_stack__"); + DECL_ATTRIBUTES(decl) = tree_cons(attr, NULL_TREE, NULL_TREE); + } + if (in_unique_section) + resolve_unique_section(decl, 0, 1); + + go_preserve_from_gc(decl); + return new Bfunction(decl); +} + // The single backend. static Gcc_backend gcc_backend; @@ -1799,3 +1880,9 @@ var_to_tree(Bvariable* bv) { return bv->get_tree(); } + +tree +function_to_tree(Bfunction* bf) +{ + return bf->get_tree(); +} diff --git a/gcc-4_8-branch/gcc/go/gofrontend/backend.h b/gcc-4_8-branch/gcc/go/gofrontend/backend.h index fa3e3cc6893..ca997f08ade 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/backend.h +++ b/gcc-4_8-branch/gcc/go/gofrontend/backend.h @@ -23,7 +23,7 @@ class Bexpression; // The backend representation of a statement. class Bstatement; -// The backend representation of a function definition. +// The backend representation of a function definition or declaration. class Bfunction; // The backend representation of a block. @@ -266,6 +266,11 @@ class Backend virtual Bexpression* convert_expression(Btype* type, Bexpression* expr, Location) = 0; + // Create an expression for the address of a function. This is used to + // get the address of the code for a function. + virtual Bexpression* + function_code_expression(Bfunction*, Location) = 0; + // Statements. // Create an error statement. This is used for cases which should @@ -498,6 +503,32 @@ class Backend // recover. virtual Bexpression* label_address(Blabel*, Location) = 0; + + // Functions. + + // Create an error function. This is used for cases which should + // not occur in a correct program, in order to keep the compilation + // going without crashing. + virtual Bfunction* + error_function() = 0; + + // Declare or define a function of FNTYPE. + // NAME is the Go name of the function. ASM_NAME, if not the empty string, is + // the name that should be used in the symbol table; this will be non-empty if + // a magic extern comment is used. + // IS_VISIBLE is true if this function should be visible outside of the + // current compilation unit. IS_DECLARATION is true if this is a function + // declaration rather than a definition; the function definition will be in + // another compilation unit. + // IS_INLINABLE is true if the function can be inlined. + // DISABLE_SPLIT_STACK is true if this function may not split the stack; this + // is used for the implementation of recover. + // IN_UNIQUE_SECTION is true if this function should be put into a unique + // location if possible; this is used for field tracking. + virtual Bfunction* + function(Btype* fntype, const std::string& name, const std::string& asm_name, + bool is_visible, bool is_declaration, bool is_inlinable, + bool disable_split_stack, bool in_unique_section, Location) = 0; }; // The backend interface has to define this function. @@ -517,5 +548,6 @@ extern tree expr_to_tree(Bexpression*); extern tree stat_to_tree(Bstatement*); extern tree block_to_tree(Bblock*); extern tree var_to_tree(Bvariable*); +extern tree function_to_tree(Bfunction*); #endif // !defined(GO_BACKEND_H) diff --git a/gcc-4_8-branch/gcc/go/gofrontend/expressions.cc b/gcc-4_8-branch/gcc/go/gofrontend/expressions.cc index d5e3a67625a..6ba351e2f42 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/expressions.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/expressions.cc @@ -1219,7 +1219,7 @@ Func_expression::do_type() // Get the tree for the code of a function expression. -tree +Bexpression* Func_expression::get_code_pointer(Gogo* gogo, Named_object* no, Location loc) { Function_type* fntype; @@ -1237,25 +1237,18 @@ Func_expression::get_code_pointer(Gogo* gogo, Named_object* no, Location loc) error_at(loc, "invalid use of special builtin function %qs; must be called", no->message_name().c_str()); - return error_mark_node; + return gogo->backend()->error_expression(); } - tree id = no->get_id(gogo); - if (id == error_mark_node) - return error_mark_node; - - tree fndecl; + Bfunction* fndecl; if (no->is_function()) - fndecl = no->func_value()->get_or_make_decl(gogo, no, id); + fndecl = no->func_value()->get_or_make_decl(gogo, no); else if (no->is_function_declaration()) - fndecl = no->func_declaration_value()->get_or_make_decl(gogo, no, id); + fndecl = no->func_declaration_value()->get_or_make_decl(gogo, no); else go_unreachable(); - if (fndecl == error_mark_node) - return error_mark_node; - - return build_fold_addr_expr_loc(loc.gcc_location(), fndecl); + return gogo->backend()->function_code_expression(fndecl, loc); } // Get the tree for a function expression. This is used when we take @@ -1492,8 +1485,10 @@ class Func_code_reference_expression : public Expression tree Func_code_reference_expression::do_get_tree(Translate_context* context) { - return Func_expression::get_code_pointer(context->gogo(), this->function_, - this->location()); + Bexpression* ret = + Func_expression::get_code_pointer(context->gogo(), this->function_, + this->location()); + return expr_to_tree(ret); } // Make a reference to the code of a function. @@ -3055,8 +3050,7 @@ class Type_conversion_expression : public Expression do_lower(Gogo*, Named_object*, Statement_inserter*, int); bool - do_is_constant() const - { return this->expr_->is_constant(); } + do_is_constant() const; bool do_numeric_constant_value(Numeric_constant*) const; @@ -3198,6 +3192,27 @@ Type_conversion_expression::do_lower(Gogo*, Named_object*, return this; } +// Return whether a type conversion is a constant. + +bool +Type_conversion_expression::do_is_constant() const +{ + if (!this->expr_->is_constant()) + return false; + + // A conversion to a type that may not be used as a constant is not + // a constant. For example, []byte(nil). + Type* type = this->type_; + if (type->integer_type() == NULL + && type->float_type() == NULL + && type->complex_type() == NULL + && !type->is_boolean_type() + && !type->is_string_type()) + return false; + + return true; +} + // Return the constant numeric value if there is one. bool @@ -5586,6 +5601,15 @@ Binary_expression::do_determine_type(const Type_context* context) subcontext.type = NULL; } + if (this->op_ == OPERATOR_ANDAND || this->op_ == OPERATOR_OROR) + { + // For a logical operation, the context does not determine the + // types of the operands. The operands must be some boolean + // type but if the context has a boolean type they do not + // inherit it. See http://golang.org/issue/3924. + subcontext.type = NULL; + } + // Set the context for the left hand operand. if (is_shift_op) { @@ -5967,6 +5991,43 @@ Binary_expression::do_get_tree(Translate_context* context) right); } + // For complex division Go wants slightly different results than the + // GCC library provides, so we have our own runtime routine. + if (this->op_ == OPERATOR_DIV && this->left_->type()->complex_type() != NULL) + { + const char *name; + tree *pdecl; + Type* ctype; + static tree complex64_div_decl; + static tree complex128_div_decl; + switch (this->left_->type()->complex_type()->bits()) + { + case 64: + name = "__go_complex64_div"; + pdecl = &complex64_div_decl; + ctype = Type::lookup_complex_type("complex64"); + break; + case 128: + name = "__go_complex128_div"; + pdecl = &complex128_div_decl; + ctype = Type::lookup_complex_type("complex128"); + break; + default: + go_unreachable(); + } + Btype* cbtype = ctype->get_backend(gogo); + tree ctype_tree = type_to_tree(cbtype); + return Gogo::call_builtin(pdecl, + this->location(), + name, + 2, + ctype_tree, + ctype_tree, + fold_convert_loc(gccloc, ctype_tree, left), + type, + fold_convert_loc(gccloc, ctype_tree, right)); + } + tree compute_type = excess_precision_type(type); if (compute_type != NULL_TREE) { @@ -7191,6 +7252,15 @@ Builtin_call_expression::do_lower(Gogo* gogo, Named_object* function, if (this->code_ == BUILTIN_OFFSETOF) { Expression* arg = this->one_arg(); + + if (arg->bound_method_expression() != NULL + || arg->interface_field_reference_expression() != NULL) + { + this->report_error(_("invalid use of method value as argument " + "of Offsetof")); + return this; + } + Field_reference_expression* farg = arg->field_reference_expression(); while (farg != NULL) { @@ -7200,7 +7270,8 @@ Builtin_call_expression::do_lower(Gogo* gogo, Named_object* function, // it must not be reached through pointer indirections. if (farg->expr()->deref() != farg->expr()) { - this->report_error(_("argument of Offsetof implies indirection of an embedded field")); + this->report_error(_("argument of Offsetof implies " + "indirection of an embedded field")); return this; } // Go up until we reach the original base. @@ -7476,7 +7547,7 @@ Builtin_call_expression::check_int_value(Expression* e, bool is_length) switch (nc.to_unsigned_long(&v)) { case Numeric_constant::NC_UL_VALID: - return true; + break; case Numeric_constant::NC_UL_NOTINT: error_at(e->location(), "non-integer %s argument to make", is_length ? "len" : "cap"); @@ -7488,8 +7559,23 @@ Builtin_call_expression::check_int_value(Expression* e, bool is_length) case Numeric_constant::NC_UL_BIG: // We don't want to give a compile-time error for a 64-bit // value on a 32-bit target. - return true; + break; + } + + mpz_t val; + if (!nc.to_int(&val)) + go_unreachable(); + int bits = mpz_sizeinbase(val, 2); + mpz_clear(val); + Type* int_type = Type::lookup_integer_type("int"); + if (bits >= int_type->integer_type()->bits()) + { + error_at(e->location(), "%s argument too large for make", + is_length ? "len" : "cap"); + return false; } + + return true; } if (e->type()->integer_type() != NULL) @@ -7595,6 +7681,8 @@ Find_call_expression::expression(Expression** pexpr) bool Builtin_call_expression::do_is_constant() const { + if (this->is_error_expression()) + return true; switch (this->code_) { case BUILTIN_LEN: @@ -9744,14 +9832,8 @@ Call_expression::do_get_tree(Translate_context* context) } tree fntype_tree = type_to_tree(fntype->get_backend(gogo)); - if (fntype_tree == error_mark_node) - return error_mark_node; - go_assert(POINTER_TYPE_P(fntype_tree)); - if (TREE_TYPE(fntype_tree) == error_mark_node) - return error_mark_node; - go_assert(TREE_CODE(TREE_TYPE(fntype_tree)) == RECORD_TYPE); - tree fnfield_type = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(fntype_tree))); - if (fnfield_type == error_mark_node) + tree fnfield_type = type_to_tree(fntype->get_backend_fntype(gogo)); + if (fntype_tree == error_mark_node || fnfield_type == error_mark_node) return error_mark_node; go_assert(FUNCTION_POINTER_TYPE_P(fnfield_type)); tree rettype = TREE_TYPE(TREE_TYPE(fnfield_type)); @@ -9763,7 +9845,7 @@ Call_expression::do_get_tree(Translate_context* context) if (func != NULL) { Named_object* no = func->named_object(); - fn = Func_expression::get_code_pointer(gogo, no, location); + fn = expr_to_tree(Func_expression::get_code_pointer(gogo, no, location)); if (!has_closure) closure_tree = NULL_TREE; else @@ -10817,11 +10899,20 @@ String_index_expression::do_determine_type(const Type_context*) void String_index_expression::do_check_types(Gogo*) { - if (this->start_->type()->integer_type() == NULL) + Numeric_constant nc; + unsigned long v; + if (this->start_->type()->integer_type() == NULL + && !this->start_->type()->is_error() + && (!this->start_->numeric_constant_value(&nc) + || nc.to_unsigned_long(&v) == Numeric_constant::NC_UL_NOTINT)) this->report_error(_("index must be integer")); if (this->end_ != NULL && this->end_->type()->integer_type() == NULL - && !this->end_->is_nil_expression()) + && !this->end_->type()->is_error() + && !this->end_->is_nil_expression() + && !this->end_->is_error_expression() + && (!this->end_->numeric_constant_value(&nc) + || nc.to_unsigned_long(&v) == Numeric_constant::NC_UL_NOTINT)) this->report_error(_("slice end must be integer")); std::string sval; diff --git a/gcc-4_8-branch/gcc/go/gofrontend/expressions.h b/gcc-4_8-branch/gcc/go/gofrontend/expressions.h index bc7a25f766a..35bfcfe8e4f 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/expressions.h +++ b/gcc-4_8-branch/gcc/go/gofrontend/expressions.h @@ -1514,8 +1514,8 @@ class Func_expression : public Expression closure() { return this->closure_; } - // Return a tree for the code for a function. - static tree + // Return a backend expression for the code of a function. + static Bexpression* get_code_pointer(Gogo*, Named_object* function, Location loc); protected: diff --git a/gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc b/gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc index a95f2901509..ca80869da6a 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/gogo-tree.cc @@ -985,74 +985,6 @@ Gogo::write_globals() delete[] vec; } -// Get a tree for the identifier for a named object. - -tree -Named_object::get_id(Gogo* gogo) -{ - go_assert(!this->is_variable() && !this->is_result_variable()); - std::string decl_name; - if (this->is_function_declaration() - && !this->func_declaration_value()->asm_name().empty()) - decl_name = this->func_declaration_value()->asm_name(); - else if (this->is_type() - && Linemap::is_predeclared_location(this->type_value()->location())) - { - // We don't need the package name for builtin types. - decl_name = Gogo::unpack_hidden_name(this->name_); - } - else - { - std::string package_name; - if (this->package_ == NULL) - package_name = gogo->package_name(); - else - package_name = this->package_->package_name(); - - // Note that this will be misleading if this is an unexported - // method generated for an embedded imported type. In that case - // the unexported method should have the package name of the - // package from which it is imported, but we are going to give - // it our package name. Fixing this would require knowing the - // package name, but we only know the package path. It might be - // better to use package paths here anyhow. This doesn't affect - // the assembler code, because we always set that name in - // Function::get_or_make_decl anyhow. FIXME. - - decl_name = package_name + '.' + Gogo::unpack_hidden_name(this->name_); - - Function_type* fntype; - if (this->is_function()) - fntype = this->func_value()->type(); - else if (this->is_function_declaration()) - fntype = this->func_declaration_value()->type(); - else - fntype = NULL; - if (fntype != NULL && fntype->is_method()) - { - decl_name.push_back('.'); - decl_name.append(fntype->receiver()->type()->mangled_name(gogo)); - } - } - if (this->is_type()) - { - unsigned int index; - const Named_object* in_function = this->type_value()->in_function(&index); - if (in_function != NULL) - { - decl_name += '$' + Gogo::unpack_hidden_name(in_function->name()); - if (index > 0) - { - char buf[30]; - snprintf(buf, sizeof buf, "%u", index); - decl_name += '$'; - decl_name += buf; - } - } - } - return get_identifier_from_string(decl_name); -} - // Get a tree for a named object. tree @@ -1067,11 +999,6 @@ Named_object::get_tree(Gogo* gogo, Named_object* function) return error_mark_node; } - tree name; - if (this->classification_ == NAMED_OBJECT_TYPE) - name = NULL_TREE; - else - name = this->get_id(gogo); tree decl; switch (this->classification_) { @@ -1099,6 +1026,7 @@ Named_object::get_tree(Gogo* gogo, Named_object* function) decl = error_mark_node; else if (INTEGRAL_TYPE_P(TREE_TYPE(expr_tree))) { + tree name = get_identifier_from_string(this->get_id(gogo)); decl = build_decl(named_constant->location().gcc_location(), CONST_DECL, name, TREE_TYPE(expr_tree)); DECL_INITIAL(decl) = expr_tree; @@ -1161,7 +1089,7 @@ Named_object::get_tree(Gogo* gogo, Named_object* function) case NAMED_OBJECT_FUNC: { Function* func = this->u_.func_value; - decl = func->get_or_make_decl(gogo, this, name); + decl = function_to_tree(func->get_or_make_decl(gogo, this)); if (decl != error_mark_node) { if (func->block() != NULL) @@ -1286,123 +1214,12 @@ Variable::get_init_block(Gogo* gogo, Named_object* function, tree var_decl) return block_tree; } -// Get a tree for a function decl. +// Get the backend representation. -tree -Function::get_or_make_decl(Gogo* gogo, Named_object* no, tree id) +Bfunction* +Function_declaration::get_or_make_decl(Gogo* gogo, Named_object* no) { - if (this->fndecl_ == NULL_TREE) - { - tree functype = type_to_tree(this->type_->get_backend(gogo)); - - if (functype != error_mark_node) - { - // The type of a function comes back as a pointer to a - // struct whose first field is the function, but we want the - // real function type for a function declaration. - go_assert(POINTER_TYPE_P(functype) - && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE); - functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype))); - go_assert(FUNCTION_POINTER_TYPE_P(functype)); - functype = TREE_TYPE(functype); - } - - if (functype == error_mark_node) - this->fndecl_ = error_mark_node; - else - { - tree decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, - id, functype); - - this->fndecl_ = decl; - - if (no->package() != NULL) - ; - else if (this->enclosing_ != NULL || Gogo::is_thunk(no)) - ; - else if (Gogo::unpack_hidden_name(no->name()) == "init" - && !this->type_->is_method()) - ; - else if (Gogo::unpack_hidden_name(no->name()) == "main" - && gogo->is_main_package()) - TREE_PUBLIC(decl) = 1; - // Methods have to be public even if they are hidden because - // they can be pulled into type descriptors when using - // anonymous fields. - else if (!Gogo::is_hidden_name(no->name()) - || this->type_->is_method()) - { - TREE_PUBLIC(decl) = 1; - std::string pkgpath = gogo->pkgpath_symbol(); - if (this->type_->is_method() - && Gogo::is_hidden_name(no->name()) - && Gogo::hidden_name_pkgpath(no->name()) != gogo->pkgpath()) - { - // This is a method we created for an unexported - // method of an imported embedded type. We need to - // use the pkgpath of the imported package to avoid - // a possible name collision. See bug478 for a test - // case. - pkgpath = Gogo::hidden_name_pkgpath(no->name()); - pkgpath = Gogo::pkgpath_for_symbol(pkgpath); - } - - std::string asm_name = pkgpath; - asm_name.append(1, '.'); - asm_name.append(Gogo::unpack_hidden_name(no->name())); - if (this->type_->is_method()) - { - asm_name.append(1, '.'); - Type* rtype = this->type_->receiver()->type(); - asm_name.append(rtype->mangled_name(gogo)); - } - SET_DECL_ASSEMBLER_NAME(decl, - get_identifier_from_string(asm_name)); - } - - // Why do we have to do this in the frontend? - tree restype = TREE_TYPE(functype); - tree resdecl = - build_decl(this->location().gcc_location(), RESULT_DECL, NULL_TREE, - restype); - DECL_ARTIFICIAL(resdecl) = 1; - DECL_IGNORED_P(resdecl) = 1; - DECL_CONTEXT(resdecl) = decl; - DECL_RESULT(decl) = resdecl; - - // If a function calls the predeclared recover function, we - // can't inline it, because recover behaves differently in a - // function passed directly to defer. If this is a recover - // thunk that we built to test whether a function can be - // recovered, we can't inline it, because that will mess up - // our return address comparison. - if (this->calls_recover_ || this->is_recover_thunk_) - DECL_UNINLINABLE(decl) = 1; - - // If this is a thunk created to call a function which calls - // the predeclared recover function, we need to disable - // stack splitting for the thunk. - if (this->is_recover_thunk_) - { - tree attr = get_identifier("__no_split_stack__"); - DECL_ATTRIBUTES(decl) = tree_cons(attr, NULL_TREE, NULL_TREE); - } - - if (this->in_unique_section_) - resolve_unique_section (decl, 0, 1); - - go_preserve_from_gc(decl); - } - } - return this->fndecl_; -} - -// Get a tree for a function declaration. - -tree -Function_declaration::get_or_make_decl(Gogo* gogo, Named_object* no, tree id) -{ - if (this->fndecl_ == NULL_TREE) + if (this->fndecl_ == NULL) { // Let Go code use an asm declaration to pick up a builtin // function. @@ -1412,58 +1229,46 @@ Function_declaration::get_or_make_decl(Gogo* gogo, Named_object* no, tree id) builtin_functions.find(this->asm_name_); if (p != builtin_functions.end()) { - this->fndecl_ = p->second; + this->fndecl_ = tree_to_function(p->second); return this->fndecl_; } } - tree functype = type_to_tree(this->fntype_->get_backend(gogo)); - - if (functype != error_mark_node) - { - // The type of a function comes back as a pointer to a - // struct whose first field is the function, but we want the - // real function type for a function declaration. - go_assert(POINTER_TYPE_P(functype) - && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE); - functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype))); - go_assert(FUNCTION_POINTER_TYPE_P(functype)); - functype = TREE_TYPE(functype); - } - - tree decl; - if (functype == error_mark_node) - decl = error_mark_node; - else - { - decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, id, - functype); - TREE_PUBLIC(decl) = 1; - DECL_EXTERNAL(decl) = 1; + std::string asm_name; + if (this->asm_name_.empty()) + { + asm_name = (no->package() == NULL + ? gogo->pkgpath_symbol() + : no->package()->pkgpath_symbol()); + asm_name.append(1, '.'); + asm_name.append(Gogo::unpack_hidden_name(no->name())); + if (this->fntype_->is_method()) + { + asm_name.append(1, '.'); + Type* rtype = this->fntype_->receiver()->type(); + asm_name.append(rtype->mangled_name(gogo)); + } + } - if (this->asm_name_.empty()) - { - std::string asm_name = (no->package() == NULL - ? gogo->pkgpath_symbol() - : no->package()->pkgpath_symbol()); - asm_name.append(1, '.'); - asm_name.append(Gogo::unpack_hidden_name(no->name())); - if (this->fntype_->is_method()) - { - asm_name.append(1, '.'); - Type* rtype = this->fntype_->receiver()->type(); - asm_name.append(rtype->mangled_name(gogo)); - } - SET_DECL_ASSEMBLER_NAME(decl, - get_identifier_from_string(asm_name)); - } - } - this->fndecl_ = decl; - go_preserve_from_gc(decl); + Btype* functype = this->fntype_->get_backend_fntype(gogo); + this->fndecl_ = + gogo->backend()->function(functype, no->get_id(gogo), asm_name, + true, true, true, false, false, + this->location()); } + return this->fndecl_; } +// Return the function's decl after it has been built. + +tree +Function::get_decl() const +{ + go_assert(this->fndecl_ != NULL); + return function_to_tree(this->fndecl_); +} + // We always pass the receiver to a method as a pointer. If the // receiver is actually declared as a non-pointer type, then we copy // the value into a local variable, so that it has the right type. In @@ -1558,7 +1363,7 @@ Function::copy_parm_to_heap(Gogo* gogo, Named_object* no, tree var_decl) void Function::build_tree(Gogo* gogo, Named_object* named_function) { - tree fndecl = this->fndecl_; + tree fndecl = this->get_decl(); go_assert(fndecl != NULL_TREE); tree params = NULL_TREE; @@ -1796,7 +1601,7 @@ Function::build_defer_wrapper(Gogo* gogo, Named_object* named_function, set = NULL_TREE; else set = fold_build2_loc(end_loc.gcc_location(), MODIFY_EXPR, void_type_node, - DECL_RESULT(this->fndecl_), retval); + DECL_RESULT(this->get_decl()), retval); tree ret_stmt = fold_build1_loc(end_loc.gcc_location(), RETURN_EXPR, void_type_node, set); append_to_statement_list(ret_stmt, &stmt_list); @@ -1851,7 +1656,7 @@ Function::build_defer_wrapper(Gogo* gogo, Named_object* named_function, retval = this->return_value(gogo, named_function, end_loc, &stmt_list); set = fold_build2_loc(end_loc.gcc_location(), MODIFY_EXPR, void_type_node, - DECL_RESULT(this->fndecl_), retval); + DECL_RESULT(this->get_decl()), retval); ret_stmt = fold_build1_loc(end_loc.gcc_location(), RETURN_EXPR, void_type_node, set); @@ -1869,7 +1674,7 @@ Function::build_defer_wrapper(Gogo* gogo, Named_object* named_function, *fini = stmt_list; } -// Return the value to assign to DECL_RESULT(this->fndecl_). This may +// Return the value to assign to DECL_RESULT(this->get_decl()). This may // also add statements to STMT_LIST, which need to be executed before // the assignment. This is used for a return statement with no // explicit values. @@ -1902,7 +1707,7 @@ Function::return_value(Gogo* gogo, Named_object* named_function, } else { - tree rettype = TREE_TYPE(DECL_RESULT(this->fndecl_)); + tree rettype = TREE_TYPE(DECL_RESULT(this->get_decl())); retval = create_tmp_var(rettype, "RESULT"); tree field = TYPE_FIELDS(rettype); int index = 0; @@ -2323,18 +2128,14 @@ Gogo::interface_method_table_for_type(const Interface_type* interface, go_assert(m != NULL); Named_object* no = m->named_object(); - - tree fnid = no->get_id(this); - - tree fndecl; + Bfunction* bf; if (no->is_function()) - fndecl = no->func_value()->get_or_make_decl(this, no, fnid); + bf = no->func_value()->get_or_make_decl(this, no); else if (no->is_function_declaration()) - fndecl = no->func_declaration_value()->get_or_make_decl(this, no, - fnid); + bf = no->func_declaration_value()->get_or_make_decl(this, no); else go_unreachable(); - fndecl = build_fold_addr_expr(fndecl); + tree fndecl = build_fold_addr_expr(function_to_tree(bf)); elt = pointers->quick_push(empty); elt->index = size_int(i); @@ -2353,10 +2154,11 @@ Gogo::interface_method_table_for_type(const Interface_type* interface, TREE_CONSTANT(decl) = 1; DECL_INITIAL(decl) = constructor; - // If the interface type has hidden methods, then this is the only - // definition of the table. Otherwise it is a comdat table which - // may be defined in multiple packages. - if (has_hidden_methods) + // If the interface type has hidden methods, and the table is for a + // named type, then this is the only definition of the table. + // Otherwise it is a comdat table which may be defined in multiple + // packages. + if (has_hidden_methods && type->named_type() != NULL) TREE_PUBLIC(decl) = 1; else { diff --git a/gcc-4_8-branch/gcc/go/gofrontend/gogo.cc b/gcc-4_8-branch/gcc/go/gofrontend/gogo.cc index 9f918cb81c7..eebb75377fa 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/gogo.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/gogo.cc @@ -3320,7 +3320,8 @@ Function::Function(Function_type* type, Function* enclosing, Block* block, closure_var_(NULL), block_(block), location_(location), labels_(), local_type_count_(0), descriptor_(NULL), fndecl_(NULL), defer_stack_(NULL), is_sink_(false), results_are_named_(false), nointerface_(false), - calls_recover_(false), is_recover_thunk_(false), has_recover_thunk_(false), + is_unnamed_type_stub_method_(false), calls_recover_(false), + is_recover_thunk_(false), has_recover_thunk_(false), in_unique_section_(false) { } @@ -3819,6 +3820,81 @@ Function::import_func(Import* imp, std::string* pname, *presults = results; } +// Get the backend representation. + +Bfunction* +Function::get_or_make_decl(Gogo* gogo, Named_object* no) +{ + if (this->fndecl_ == NULL) + { + std::string asm_name; + bool is_visible = false; + if (no->package() != NULL) + ; + else if (this->enclosing_ != NULL || Gogo::is_thunk(no)) + ; + else if (Gogo::unpack_hidden_name(no->name()) == "init" + && !this->type_->is_method()) + ; + else if (Gogo::unpack_hidden_name(no->name()) == "main" + && gogo->is_main_package()) + is_visible = true; + // Methods have to be public even if they are hidden because + // they can be pulled into type descriptors when using + // anonymous fields. + else if (!Gogo::is_hidden_name(no->name()) + || this->type_->is_method()) + { + if (!this->is_unnamed_type_stub_method_) + is_visible = true; + std::string pkgpath = gogo->pkgpath_symbol(); + if (this->type_->is_method() + && Gogo::is_hidden_name(no->name()) + && Gogo::hidden_name_pkgpath(no->name()) != gogo->pkgpath()) + { + // This is a method we created for an unexported + // method of an imported embedded type. We need to + // use the pkgpath of the imported package to avoid + // a possible name collision. See bug478 for a test + // case. + pkgpath = Gogo::hidden_name_pkgpath(no->name()); + pkgpath = Gogo::pkgpath_for_symbol(pkgpath); + } + + asm_name = pkgpath; + asm_name.append(1, '.'); + asm_name.append(Gogo::unpack_hidden_name(no->name())); + if (this->type_->is_method()) + { + asm_name.append(1, '.'); + Type* rtype = this->type_->receiver()->type(); + asm_name.append(rtype->mangled_name(gogo)); + } + } + + // If a function calls the predeclared recover function, we + // can't inline it, because recover behaves differently in a + // function passed directly to defer. If this is a recover + // thunk that we built to test whether a function can be + // recovered, we can't inline it, because that will mess up + // our return address comparison. + bool is_inlinable = !(this->calls_recover_ || this->is_recover_thunk_); + + // If this is a thunk created to call a function which calls + // the predeclared recover function, we need to disable + // stack splitting for the thunk. + bool disable_split_stack = this->is_recover_thunk_; + + Btype* functype = this->type_->get_backend_fntype(gogo); + this->fndecl_ = + gogo->backend()->function(functype, no->get_id(gogo), asm_name, + is_visible, false, is_inlinable, + disable_split_stack, + this->in_unique_section_, this->location()); + } + return this->fndecl_; +} + // Class Block. Block::Block(Block* enclosing, Location location) @@ -5110,6 +5186,75 @@ Named_object::get_backend_variable(Gogo* gogo, Named_object* function) go_unreachable(); } + +// Return the external identifier for this object. + +std::string +Named_object::get_id(Gogo* gogo) +{ + go_assert(!this->is_variable() && !this->is_result_variable()); + std::string decl_name; + if (this->is_function_declaration() + && !this->func_declaration_value()->asm_name().empty()) + decl_name = this->func_declaration_value()->asm_name(); + else if (this->is_type() + && Linemap::is_predeclared_location(this->type_value()->location())) + { + // We don't need the package name for builtin types. + decl_name = Gogo::unpack_hidden_name(this->name_); + } + else + { + std::string package_name; + if (this->package_ == NULL) + package_name = gogo->package_name(); + else + package_name = this->package_->package_name(); + + // Note that this will be misleading if this is an unexported + // method generated for an embedded imported type. In that case + // the unexported method should have the package name of the + // package from which it is imported, but we are going to give + // it our package name. Fixing this would require knowing the + // package name, but we only know the package path. It might be + // better to use package paths here anyhow. This doesn't affect + // the assembler code, because we always set that name in + // Function::get_or_make_decl anyhow. FIXME. + + decl_name = package_name + '.' + Gogo::unpack_hidden_name(this->name_); + + Function_type* fntype; + if (this->is_function()) + fntype = this->func_value()->type(); + else if (this->is_function_declaration()) + fntype = this->func_declaration_value()->type(); + else + fntype = NULL; + if (fntype != NULL && fntype->is_method()) + { + decl_name.push_back('.'); + decl_name.append(fntype->receiver()->type()->mangled_name(gogo)); + } + } + if (this->is_type()) + { + unsigned int index; + const Named_object* in_function = this->type_value()->in_function(&index); + if (in_function != NULL) + { + decl_name += '$' + Gogo::unpack_hidden_name(in_function->name()); + if (index > 0) + { + char buf[30]; + snprintf(buf, sizeof buf, "%u", index); + decl_name += '$'; + decl_name += buf; + } + } + } + return decl_name; +} + // Class Bindings. Bindings::Bindings(Bindings* enclosing) diff --git a/gcc-4_8-branch/gcc/go/gofrontend/gogo.h b/gcc-4_8-branch/gcc/go/gofrontend/gogo.h index 23968d4a191..31b258d62d6 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/gogo.h +++ b/gcc-4_8-branch/gcc/go/gofrontend/gogo.h @@ -48,6 +48,7 @@ class Bstatement; class Bblock; class Bvariable; class Blabel; +class Bfunction; // This file declares the basic classes used to hold the internal // representation of Go which is built by the parser. @@ -952,6 +953,15 @@ class Function this->nointerface_ = true; } + // Record that this function is a stub method created for an unnamed + // type. + void + set_is_unnamed_type_stub_method() + { + go_assert(this->is_method()); + this->is_unnamed_type_stub_method_ = true; + } + // Add a new field to the closure variable. void add_closure_field(Named_object* var, Location loc) @@ -1089,17 +1099,13 @@ class Function this->descriptor_ = descriptor; } - // Return the function's decl given an identifier. - tree - get_or_make_decl(Gogo*, Named_object*, tree id); + // Return the backend representation. + Bfunction* + get_or_make_decl(Gogo*, Named_object*); // Return the function's decl after it has been built. tree - get_decl() const - { - go_assert(this->fndecl_ != NULL); - return this->fndecl_; - } + get_decl() const; // Set the function decl to hold a tree of the function code. void @@ -1170,7 +1176,7 @@ class Function // The function descriptor, if any. Expression* descriptor_; // The function decl. - tree fndecl_; + Bfunction* fndecl_; // The defer stack variable. A pointer to this variable is used to // distinguish the defer stack for one function from another. This // is NULL unless we actually need a defer stack. @@ -1181,6 +1187,9 @@ class Function bool results_are_named_ : 1; // True if this method should not be included in the type descriptor. bool nointerface_ : 1; + // True if this function is a stub method created for an unnamed + // type. + bool is_unnamed_type_stub_method_ : 1; // True if this function calls the predeclared recover function. bool calls_recover_ : 1; // True if this a thunk built for a function which calls recover. @@ -1265,9 +1274,9 @@ class Function_declaration has_descriptor() const { return this->descriptor_ != NULL; } - // Return a decl for the function given an identifier. - tree - get_or_make_decl(Gogo*, Named_object*, tree id); + // Return a backend representation. + Bfunction* + get_or_make_decl(Gogo*, Named_object*); // If there is a descriptor, build it into the backend // representation. @@ -1290,7 +1299,7 @@ class Function_declaration // The function descriptor, if any. Expression* descriptor_; // The function decl if needed. - tree fndecl_; + Bfunction* fndecl_; }; // A variable. @@ -2181,8 +2190,8 @@ class Named_object Bvariable* get_backend_variable(Gogo*, Named_object* function); - // Return a tree for the external identifier for this object. - tree + // Return the external identifier for this object. + std::string get_id(Gogo*); // Return a tree representing this object. diff --git a/gcc-4_8-branch/gcc/go/gofrontend/import.h b/gcc-4_8-branch/gcc/go/gofrontend/import.h index c6844cda8a5..9917937e4d3 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/import.h +++ b/gcc-4_8-branch/gcc/go/gofrontend/import.h @@ -149,6 +149,11 @@ class Import location() const { return this->location_; } + // Return the package we are importing. + Package* + package() const + { return this->package_; } + // Return the next character. int peek_char() diff --git a/gcc-4_8-branch/gcc/go/gofrontend/lex.cc b/gcc-4_8-branch/gcc/go/gofrontend/lex.cc index 22a1f6e2a0c..16169634733 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/lex.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/lex.cc @@ -873,7 +873,28 @@ Lex::gather_identifier() && (cc < 'a' || cc > 'z') && cc != '_' && (cc < '0' || cc > '9')) - break; + { + // Check for an invalid character here, as we get better + // error behaviour if we swallow them as part of the + // identifier we are building. + if ((cc >= ' ' && cc < 0x7f) + || cc == '\t' + || cc == '\r' + || cc == '\n') + break; + + this->lineoff_ = p - this->linebuf_; + error_at(this->location(), + "invalid character 0x%x in identifier", + cc); + if (!has_non_ascii_char) + { + buf.assign(pstart, p - pstart); + has_non_ascii_char = true; + } + if (!Lex::is_invalid_identifier(buf)) + buf.append("$INVALID$"); + } ++p; if (is_first) { diff --git a/gcc-4_8-branch/gcc/go/gofrontend/parse.cc b/gcc-4_8-branch/gcc/go/gofrontend/parse.cc index 498125bb241..9c7d8277efa 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/parse.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/parse.cc @@ -744,6 +744,8 @@ Parse::signature(Typed_identifier* receiver, Location location) return NULL; Parse::Names names; + if (receiver != NULL) + names[receiver->name()] = receiver; if (params != NULL) this->check_signature_names(params, &names); if (results != NULL) diff --git a/gcc-4_8-branch/gcc/go/gofrontend/runtime.cc b/gcc-4_8-branch/gcc/go/gofrontend/runtime.cc index ecc508d0dcc..3b0f1880758 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/runtime.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/runtime.cc @@ -42,6 +42,8 @@ enum Runtime_function_type RFT_RUNE, // Go type float64, C type double. RFT_FLOAT64, + // Go type complex64, C type __complex float. + RFT_COMPLEX64, // Go type complex128, C type __complex double. RFT_COMPLEX128, // Go type string, C type struct __go_string. @@ -126,6 +128,10 @@ runtime_function_type(Runtime_function_type bft) t = Type::lookup_float_type("float64"); break; + case RFT_COMPLEX64: + t = Type::lookup_complex_type("complex64"); + break; + case RFT_COMPLEX128: t = Type::lookup_complex_type("complex128"); break; @@ -216,6 +222,7 @@ convert_to_runtime_function_type(Runtime_function_type bft, Expression* e, case RFT_UINTPTR: case RFT_RUNE: case RFT_FLOAT64: + case RFT_COMPLEX64: case RFT_COMPLEX128: case RFT_STRING: case RFT_POINTER: diff --git a/gcc-4_8-branch/gcc/go/gofrontend/runtime.def b/gcc-4_8-branch/gcc/go/gofrontend/runtime.def index 0d3fd3c43f1..a303a50410f 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/runtime.def +++ b/gcc-4_8-branch/gcc/go/gofrontend/runtime.def @@ -68,6 +68,12 @@ DEF_GO_RUNTIME(STRING_TO_INT_ARRAY, "__go_string_to_int_array", P1(STRING), R1(SLICE)) +// Complex division. +DEF_GO_RUNTIME(COMPLEX64_DIV, "__go_complex64_div", + P2(COMPLEX64, COMPLEX64), R1(COMPLEX64)) +DEF_GO_RUNTIME(COMPLEX128_DIV, "__go_complex128_div", + P2(COMPLEX128, COMPLEX128), R1(COMPLEX128)) + // Make a slice. DEF_GO_RUNTIME(MAKESLICE1, "__go_make_slice1", P2(TYPE, UINTPTR), R1(SLICE)) DEF_GO_RUNTIME(MAKESLICE2, "__go_make_slice2", P3(TYPE, UINTPTR, UINTPTR), diff --git a/gcc-4_8-branch/gcc/go/gofrontend/types.cc b/gcc-4_8-branch/gcc/go/gofrontend/types.cc index e1d68e74345..59247d6fb05 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/types.cc +++ b/gcc-4_8-branch/gcc/go/gofrontend/types.cc @@ -3383,6 +3383,68 @@ Function_type::do_hash_for_method(Gogo* gogo) const // Get the backend representation for a function type. Btype* +Function_type::get_backend_fntype(Gogo* gogo) +{ + if (this->fnbtype_ == NULL) + { + Backend::Btyped_identifier breceiver; + if (this->receiver_ != NULL) + { + breceiver.name = Gogo::unpack_hidden_name(this->receiver_->name()); + + // We always pass the address of the receiver parameter, in + // order to make interface calls work with unknown types. + Type* rtype = this->receiver_->type(); + if (rtype->points_to() == NULL) + rtype = Type::make_pointer_type(rtype); + breceiver.btype = rtype->get_backend(gogo); + breceiver.location = this->receiver_->location(); + } + + std::vector bparameters; + if (this->parameters_ != NULL) + { + bparameters.resize(this->parameters_->size()); + size_t i = 0; + for (Typed_identifier_list::const_iterator p = + this->parameters_->begin(); p != this->parameters_->end(); + ++p, ++i) + { + bparameters[i].name = Gogo::unpack_hidden_name(p->name()); + bparameters[i].btype = p->type()->get_backend(gogo); + bparameters[i].location = p->location(); + } + go_assert(i == bparameters.size()); + } + + std::vector bresults; + if (this->results_ != NULL) + { + bresults.resize(this->results_->size()); + size_t i = 0; + for (Typed_identifier_list::const_iterator p = + this->results_->begin(); p != this->results_->end(); + ++p, ++i) + { + bresults[i].name = Gogo::unpack_hidden_name(p->name()); + bresults[i].btype = p->type()->get_backend(gogo); + bresults[i].location = p->location(); + } + go_assert(i == bresults.size()); + } + + this->fnbtype_ = gogo->backend()->function_type(breceiver, bparameters, + bresults, + this->location()); + + } + + return this->fnbtype_; +} + +// Get the backend representation for a Go function type. + +Btype* Function_type::do_get_backend(Gogo* gogo) { // When we do anything with a function value other than call it, it @@ -3395,57 +3457,9 @@ Function_type::do_get_backend(Gogo* gogo) gogo->backend()->placeholder_struct_type("__go_descriptor", loc); Btype* ptr_struct_type = gogo->backend()->pointer_type(struct_type); - Backend::Btyped_identifier breceiver; - if (this->receiver_ != NULL) - { - breceiver.name = Gogo::unpack_hidden_name(this->receiver_->name()); - - // We always pass the address of the receiver parameter, in - // order to make interface calls work with unknown types. - Type* rtype = this->receiver_->type(); - if (rtype->points_to() == NULL) - rtype = Type::make_pointer_type(rtype); - breceiver.btype = rtype->get_backend(gogo); - breceiver.location = this->receiver_->location(); - } - - std::vector bparameters; - if (this->parameters_ != NULL) - { - bparameters.resize(this->parameters_->size()); - size_t i = 0; - for (Typed_identifier_list::const_iterator p = this->parameters_->begin(); - p != this->parameters_->end(); - ++p, ++i) - { - bparameters[i].name = Gogo::unpack_hidden_name(p->name()); - bparameters[i].btype = p->type()->get_backend(gogo); - bparameters[i].location = p->location(); - } - go_assert(i == bparameters.size()); - } - - std::vector bresults; - if (this->results_ != NULL) - { - bresults.resize(this->results_->size()); - size_t i = 0; - for (Typed_identifier_list::const_iterator p = this->results_->begin(); - p != this->results_->end(); - ++p, ++i) - { - bresults[i].name = Gogo::unpack_hidden_name(p->name()); - bresults[i].btype = p->type()->get_backend(gogo); - bresults[i].location = p->location(); - } - go_assert(i == bresults.size()); - } - - Btype* fntype = gogo->backend()->function_type(breceiver, bparameters, - bresults, loc); std::vector fields(1); fields[0].name = "code"; - fields[0].btype = fntype; + fields[0].btype = this->get_backend_fntype(gogo); fields[0].location = loc; if (!gogo->backend()->set_placeholder_struct_type(struct_type, fields)) return gogo->backend()->error_type(); @@ -4195,7 +4209,8 @@ Struct_field::is_field_name(const std::string& name) const // This is a horrible hack caused by the fact that we don't pack // the names of builtin types. FIXME. - if (nt != NULL + if (!this->is_imported_ + && nt != NULL && nt->is_builtin() && nt->name() == Gogo::unpack_hidden_name(name)) return true; @@ -4204,6 +4219,36 @@ Struct_field::is_field_name(const std::string& name) const } } +// Return whether this field is an unexported field named NAME. + +bool +Struct_field::is_unexported_field_name(Gogo* gogo, + const std::string& name) const +{ + const std::string& field_name(this->field_name()); + if (Gogo::is_hidden_name(field_name) + && name == Gogo::unpack_hidden_name(field_name) + && gogo->pack_hidden_name(name, false) != field_name) + return true; + + // Check for the name of a builtin type. This is like the test in + // is_field_name, only there we return false if this->is_imported_, + // and here we return true. + if (this->is_imported_ && this->is_anonymous()) + { + Type* t = this->typed_identifier_.type(); + if (t->points_to() != NULL) + t = t->points_to(); + Named_type* nt = t->named_type(); + if (nt != NULL + && nt->is_builtin() + && nt->name() == Gogo::unpack_hidden_name(name)) + return true; + } + + return false; +} + // Return whether this field is an embedded built-in type. bool @@ -4264,12 +4309,7 @@ Struct_type::do_verify() ++p) { Type* t = p->type(); - if (t->is_undefined()) - { - error_at(p->location(), "struct field type is incomplete"); - p->set_type(Type::make_error_type()); - } - else if (p->is_anonymous()) + if (p->is_anonymous()) { if (t->named_type() != NULL && t->points_to() != NULL) { @@ -4641,13 +4681,8 @@ Struct_type::is_unexported_local_field(Gogo* gogo, for (Struct_field_list::const_iterator pf = fields->begin(); pf != fields->end(); ++pf) - { - const std::string& field_name(pf->field_name()); - if (Gogo::is_hidden_name(field_name) - && name == Gogo::unpack_hidden_name(field_name) - && gogo->pack_hidden_name(name, false) != field_name) - return true; - } + if (pf->is_unexported_field_name(gogo, name)) + return true; } return false; } @@ -5250,6 +5285,7 @@ Struct_type::do_import(Import* imp) Type* ftype = imp->read_type(); Struct_field sf(Typed_identifier(name, ftype, imp->location())); + sf.set_is_imported(); if (imp->peek_char() == ' ') { @@ -9022,6 +9058,8 @@ Type::build_stub_methods(Gogo* gogo, const Type* type, const Methods* methods, fntype->is_varargs(), location); gogo->finish_function(fntype->location()); + if (type->named_type() == NULL && stub->is_function()) + stub->func_value()->set_is_unnamed_type_stub_method(); if (m->nointerface() && stub->is_function()) stub->func_value()->set_nointerface(); } @@ -9289,7 +9327,9 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr, else { bool is_unexported; - if (!Gogo::is_hidden_name(name)) + // The test for 'a' and 'z' is to handle builtin names, + // which are not hidden. + if (!Gogo::is_hidden_name(name) && (name[0] < 'a' || name[0] > 'z')) is_unexported = false; else { diff --git a/gcc-4_8-branch/gcc/go/gofrontend/types.h b/gcc-4_8-branch/gcc/go/gofrontend/types.h index d8a3080f586..ed01d9cdc38 100644 --- a/gcc-4_8-branch/gcc/go/gofrontend/types.h +++ b/gcc-4_8-branch/gcc/go/gofrontend/types.h @@ -1717,7 +1717,8 @@ class Function_type : public Type Typed_identifier_list* results, Location location) : Type(TYPE_FUNCTION), receiver_(receiver), parameters_(parameters), results_(results), - location_(location), is_varargs_(false), is_builtin_(false) + location_(location), is_varargs_(false), is_builtin_(false), + fnbtype_(NULL) { } // Get the receiver. @@ -1798,6 +1799,11 @@ class Function_type : public Type static Type* make_function_type_descriptor_type(); + // Return the backend representation of this function type. This is used + // as the real type of a backend function declaration or defintion. + Btype* + get_backend_fntype(Gogo*); + protected: int do_traverse(Traverse*); @@ -1851,6 +1857,9 @@ class Function_type : public Type // Whether this is a special builtin function which can not simply // be called. This is used for len, cap, etc. bool is_builtin_; + // The backend representation of this type for backend function + // declarations and definitions. + Btype* fnbtype_; }; // The type of a pointer. @@ -1915,7 +1924,7 @@ class Struct_field { public: explicit Struct_field(const Typed_identifier& typed_identifier) - : typed_identifier_(typed_identifier), tag_(NULL) + : typed_identifier_(typed_identifier), tag_(NULL), is_imported_(false) { } // The field name. @@ -1926,6 +1935,10 @@ class Struct_field bool is_field_name(const std::string& name) const; + // Return whether this struct field is an unexported field named NAME. + bool + is_unexported_field_name(Gogo*, const std::string& name) const; + // Return whether this struct field is an embedded built-in type. bool is_embedded_builtin(Gogo*) const; @@ -1963,6 +1976,11 @@ class Struct_field set_tag(const std::string& tag) { this->tag_ = new std::string(tag); } + // Record that this field is defined in an imported struct. + void + set_is_imported() + { this->is_imported_ = true; } + // Set the type. This is only used in error cases. void set_type(Type* type) @@ -1973,6 +1991,8 @@ class Struct_field Typed_identifier typed_identifier_; // The field tag. This is NULL if the field has no tag. std::string* tag_; + // Whether this field is defined in an imported struct. + bool is_imported_; }; // A list of struct fields. diff --git a/gcc-4_8-branch/gcc/ipa-prop.c b/gcc-4_8-branch/gcc/ipa-prop.c index c62dc68a2b0..47d487d158e 100644 --- a/gcc-4_8-branch/gcc/ipa-prop.c +++ b/gcc-4_8-branch/gcc/ipa-prop.c @@ -740,7 +740,7 @@ static bool ipa_load_from_parm_agg_1 (vec descriptors, struct param_analysis_info *parms_ainfo, gimple stmt, tree op, int *index_p, HOST_WIDE_INT *offset_p, - bool *by_ref_p) + HOST_WIDE_INT *size_p, bool *by_ref_p) { int index; HOST_WIDE_INT size, max_size; @@ -758,6 +758,8 @@ ipa_load_from_parm_agg_1 (vec descriptors, { *index_p = index; *by_ref_p = false; + if (size_p) + *size_p = size; return true; } return false; @@ -800,6 +802,8 @@ ipa_load_from_parm_agg_1 (vec descriptors, { *index_p = index; *by_ref_p = true; + if (size_p) + *size_p = size; return true; } return false; @@ -814,7 +818,7 @@ ipa_load_from_parm_agg (struct ipa_node_params *info, gimple stmt, bool *by_ref_p) { return ipa_load_from_parm_agg_1 (info->descriptors, NULL, stmt, op, index_p, - offset_p, by_ref_p); + offset_p, NULL, by_ref_p); } /* Given that an actual argument is an SSA_NAME (given in NAME) and is a result @@ -1646,7 +1650,7 @@ ipa_analyze_indirect_call_uses (struct cgraph_node *node, if (gimple_assign_single_p (def) && ipa_load_from_parm_agg_1 (info->descriptors, parms_ainfo, def, gimple_assign_rhs1 (def), &index, &offset, - &by_ref)) + NULL, &by_ref)) { struct cgraph_edge *cs = ipa_note_param_call (node, index, call); cs->indirect_info->offset = offset; @@ -2126,7 +2130,6 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target) we may create the first reference to the object in the unit. */ if (!callee || callee->global.inlined_to) { - struct cgraph_node *first_clone = callee; /* We are better to ensure we can refer to it. In the case of static functions we are out of luck, since we already @@ -2142,31 +2145,7 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target) xstrdup (cgraph_node_name (ie->callee)), ie->callee->uid); return NULL; } - - /* Create symbol table node. Even if inline clone exists, we can not take - it as a target of non-inlined call. */ - callee = cgraph_create_node (target); - - /* OK, we previously inlined the function, then removed the offline copy and - now we want it back for external call. This can happen when devirtualizing - while inlining function called once that happens after extern inlined and - virtuals are already removed. In this case introduce the external node - and make it available for call. */ - if (first_clone) - { - first_clone->clone_of = callee; - callee->clones = first_clone; - symtab_prevail_in_asm_name_hash ((symtab_node)callee); - symtab_insert_node_to_hashtable ((symtab_node)callee); - if (dump_file) - fprintf (dump_file, "ipa-prop: Introduced new external node " - "(%s/%i) and turned into root of the clone tree.\n", - xstrdup (cgraph_node_name (callee)), callee->uid); - } - else if (dump_file) - fprintf (dump_file, "ipa-prop: Introduced new external node " - "(%s/%i).\n", - xstrdup (cgraph_node_name (callee)), callee->uid); + callee = cgraph_get_create_real_symbol_node (target); } ipa_check_create_node_params (); @@ -3902,7 +3881,7 @@ ipcp_transform_function (struct cgraph_node *node) struct ipa_agg_replacement_value *v; gimple stmt = gsi_stmt (gsi); tree rhs, val, t; - HOST_WIDE_INT offset; + HOST_WIDE_INT offset, size; int index; bool by_ref, vce; @@ -3929,13 +3908,15 @@ ipcp_transform_function (struct cgraph_node *node) continue; if (!ipa_load_from_parm_agg_1 (descriptors, parms_ainfo, stmt, - rhs, &index, &offset, &by_ref)) + rhs, &index, &offset, &size, &by_ref)) continue; for (v = aggval; v; v = v->next) if (v->index == index && v->offset == offset) break; - if (!v || v->by_ref != by_ref) + if (!v + || v->by_ref != by_ref + || tree_low_cst (TYPE_SIZE (TREE_TYPE (v->value)), 0) != size) continue; gcc_checking_assert (is_gimple_ip_invariant (v->value)); diff --git a/gcc-4_8-branch/gcc/java/ChangeLog b/gcc-4_8-branch/gcc/java/ChangeLog index c0f24b85005..d16146f85e5 100644 --- a/gcc-4_8-branch/gcc/java/ChangeLog +++ b/gcc-4_8-branch/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/gcc/lto/ChangeLog b/gcc-4_8-branch/gcc/lto/ChangeLog index d4ae0f9a87f..e179310f129 100644 --- a/gcc-4_8-branch/gcc/lto/ChangeLog +++ b/gcc-4_8-branch/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/gcc/objc/ChangeLog b/gcc-4_8-branch/gcc/objc/ChangeLog index 5d784dda2b4..508874cec3e 100644 --- a/gcc-4_8-branch/gcc/objc/ChangeLog +++ b/gcc-4_8-branch/gcc/objc/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/gcc/objcp/ChangeLog b/gcc-4_8-branch/gcc/objcp/ChangeLog index 4d86a7d95b8..51c37e4a4f9 100644 --- a/gcc-4_8-branch/gcc/objcp/ChangeLog +++ b/gcc-4_8-branch/gcc/objcp/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/gcc/optabs.c b/gcc-4_8-branch/gcc/optabs.c index a3051ad9d9a..fd7fe559eb8 100644 --- a/gcc-4_8-branch/gcc/optabs.c +++ b/gcc-4_8-branch/gcc/optabs.c @@ -7035,8 +7035,7 @@ maybe_emit_atomic_exchange (rtx target, rtx mem, rtx val, enum memmodel model) create_output_operand (&ops[0], target, mode); create_fixed_operand (&ops[1], mem); - /* VAL may have been promoted to a wider mode. Shrink it if so. */ - create_convert_operand_to (&ops[2], val, mode, true); + create_input_operand (&ops[2], val, mode); create_integer_operand (&ops[3], model); if (maybe_expand_insn (icode, 4, ops)) return ops[0].value; @@ -7075,8 +7074,7 @@ maybe_emit_sync_lock_test_and_set (rtx target, rtx mem, rtx val, struct expand_operand ops[3]; create_output_operand (&ops[0], target, mode); create_fixed_operand (&ops[1], mem); - /* VAL may have been promoted to a wider mode. Shrink it if so. */ - create_convert_operand_to (&ops[2], val, mode, true); + create_input_operand (&ops[2], val, mode); if (maybe_expand_insn (icode, 3, ops)) return ops[0].value; } @@ -7118,8 +7116,6 @@ maybe_emit_compare_and_swap_exchange_loop (rtx target, rtx mem, rtx val) { if (!target || !register_operand (target, mode)) target = gen_reg_rtx (mode); - if (GET_MODE (val) != VOIDmode && GET_MODE (val) != mode) - val = convert_modes (mode, GET_MODE (val), val, 1); if (expand_compare_and_swap_loop (mem, target, val, NULL_RTX)) return target; } @@ -7331,8 +7327,8 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval, create_output_operand (&ops[0], target_bool, bool_mode); create_output_operand (&ops[1], target_oval, mode); create_fixed_operand (&ops[2], mem); - create_convert_operand_to (&ops[3], expected, mode, true); - create_convert_operand_to (&ops[4], desired, mode, true); + create_input_operand (&ops[3], expected, mode); + create_input_operand (&ops[4], desired, mode); create_integer_operand (&ops[5], is_weak); create_integer_operand (&ops[6], succ_model); create_integer_operand (&ops[7], fail_model); @@ -7353,8 +7349,8 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval, create_output_operand (&ops[0], target_oval, mode); create_fixed_operand (&ops[1], mem); - create_convert_operand_to (&ops[2], expected, mode, true); - create_convert_operand_to (&ops[3], desired, mode, true); + create_input_operand (&ops[2], expected, mode); + create_input_operand (&ops[3], desired, mode); if (!maybe_expand_insn (icode, 4, ops)) return false; diff --git a/gcc-4_8-branch/gcc/po/ChangeLog b/gcc-4_8-branch/gcc/po/ChangeLog index 883bcc2f8a1..a01b6cbdc39 100644 --- a/gcc-4_8-branch/gcc/po/ChangeLog +++ b/gcc-4_8-branch/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-07-11 Joseph Myers * fi.po: Update. diff --git a/gcc-4_8-branch/gcc/recog.c b/gcc-4_8-branch/gcc/recog.c index f00859cf00a..ad096301c9e 100644 --- a/gcc-4_8-branch/gcc/recog.c +++ b/gcc-4_8-branch/gcc/recog.c @@ -3061,6 +3061,9 @@ peep2_reg_dead_p (int ofs, rtx reg) return 1; } +/* Regno offset to be used in the register search. */ +static int search_ofs; + /* Try to find a hard register of mode MODE, matching the register class in CLASS_STR, which is available at the beginning of insn CURRENT_INSN and remains available until the end of LAST_INSN. LAST_INSN may be NULL_RTX, @@ -3076,7 +3079,6 @@ rtx peep2_find_free_register (int from, int to, const char *class_str, enum machine_mode mode, HARD_REG_SET *reg_set) { - static int search_ofs; enum reg_class cl; HARD_REG_SET live; df_ref *def_rec; @@ -3541,6 +3543,7 @@ peephole2_optimize (void) /* Initialize the regsets we're going to use. */ for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i) peep2_insn_data[i].live_before = BITMAP_ALLOC (®_obstack); + search_ofs = 0; live = BITMAP_ALLOC (®_obstack); FOR_EACH_BB_REVERSE (bb) diff --git a/gcc-4_8-branch/gcc/testsuite/ChangeLog b/gcc-4_8-branch/gcc/testsuite/ChangeLog index 2d8fafc290c..8cf5680cf2d 100644 --- a/gcc-4_8-branch/gcc/testsuite/ChangeLog +++ b/gcc-4_8-branch/gcc/testsuite/ChangeLog @@ -1,3 +1,126 @@ +2013-11-07 H.J. Lu + + Backport from mainline + 2013-11-07 H.J. Lu + + PR target/59034 + * gcc.target/i386/pr59034-1.c: New test. + * gcc.target/i386/pr59034-2.c: Likewise. + +2013-11-06 Wei Mi + + PR regression/58985 + * testsuite/gcc.dg/pr57518.c: Add subreg in regexp pattern. + +2013-11-05 Steven G. Kargl + + PR fortran/58989 + * gfortran.dg/reshape_6.f90: New test. + +2013-11-05 Jakub Jelinek + + PR tree-optimization/58984 + * gcc.c-torture/execute/pr58984.c: New test. + +2013-11-04 Marek Polacek + + Backport from mainline + 2013-11-04 Marek Polacek + + PR c++/58979 + * g++.dg/diagnostic/pr58979.C: New test. + +2013-11-03 H.J. Lu + + Backport from mainline + 2013-10-12 H.J. Lu + + PR target/58690 + * gcc.target/i386/pr58690.c: New test + +2013-11-02 Janus Weil + + Backport from mainline + 2013-09-23 Janus Weil + + PR fortran/58355 + * gfortran.dg/extends_15.f90: New. + +2013-10-29 Uros Bizjak + + Backport from mainline + 2013-08-08 Richard Sandiford + + PR rtl-optimization/58079 + * gcc.dg/torture/pr58079.c: New test. + +2013-10-28 Tom de Vries + + * gcc.target/arm/require-pic-register-loc.c: New test. + +2013-10-26 Uros Bizjak + + Backport from mainline + 2013-10-22 Uros Bizjak + + PR target/58779 + * gcc.target/i386/pr30315.c: Remove MINUSCC, DECCC, MINUSCCONLY + and MINUSCCZEXT defines. Update scan-assembler dg directive. + * gcc.dg/torture/pr58779.c: New test. + +2013-10-25 Richard Henderson + + PR rtl/58542 + * gcc.dg/atomic-store-6.c: New. + +2013-10-25 Tom de Vries + + PR c++/58282 + * g++.dg/tm/noexcept-6.C: New test. + +2013-10-25 Eric Botcazou + + * gcc.c-torture/execute/pr58831.c: New test. + +2013-10-23 Tom de Vries + + PR tree-optimization/58805 + * gcc.dg/pr58805.c: New test. + +2013-10-23 Richard Biener + + * gcc.dg/torture/pr58830.c: New testcase. + + Backport from mainline + 2013-06-24 Richard Biener + + PR tree-optimization/57488 + * gcc.dg/torture/pr57488.c: New testcase. + +2013-10-19 Oleg Endo + + * gcc.target/sh/pr54089-3.c: Fix test for load of constant 31. + +2013-10-17 Paolo Carlini + + PR c++/58596 + * g++.dg/cpp0x/lambda/lambda-nsdmi5.C: New + +2013-10-16 Paolo Carlini + + PR c++/58633 + * g++.dg/cpp0x/decltype57.C: New. + * g++.dg/cpp0x/enum18.C: Revert r174385 changes. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + +2013-10-14 Rainer Orth + + * gcc.dg/torture/pr58670.c (ASM_STR) [__i386__ || __x86_64__]: Use + btsl. + 2013-10-10 Jakub Jelinek PR middle-end/58670 @@ -30,9 +153,9 @@ Backport from mainline 2013-06-27 Andreas Krebbel - * gcc.target/s390/htm-1.c: New file. - * gcc.target/s390/htm-nofloat-1.c: New file. - * gcc.target/s390/htm-xl-intrin-1.c: New file. + * gcc.target/s390/htm-1.c: New file. + * gcc.target/s390/htm-nofloat-1.c: New file. + * gcc.target/s390/htm-xl-intrin-1.c: New file. 2013-10-04 Tobias Burnus @@ -298,8 +421,8 @@ Backport from mainline 2013-08-12 Perez Read - PR target/58132 - * gcc.target/i386/movabs-1.c: New test. + PR target/58132 + * gcc.target/i386/movabs-1.c: New test. 2013-08-11 Janus Weil @@ -614,8 +737,8 @@ 2013-05-09 Martin Jambor - PR middle-end/56988 - * gcc.dg/ipa/pr56988.c: New test. + PR middle-end/56988 + * gcc.dg/ipa/pr56988.c: New test. 2013-05-08 Marc Glisse @@ -692,7 +815,7 @@ 2013-04-25 Marek Polacek PR tree-optimization/57066 - * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. + * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. 2013-05-02 Jakub Jelinek @@ -718,32 +841,32 @@ Backport from mainline 2013-04-24 Vladimir Makarov - PR rtl-optimizations/57046 - * gcc.target/i386/pr57046.c: New test. + PR rtl-optimizations/57046 + * gcc.target/i386/pr57046.c: New test. 2013-05-02 Vladimir Makarov Backport from mainline 2013-04-22 Vladimir Makarov - PR target/57018 - * gcc.target/i386/pr57018.c: New test. + PR target/57018 + * gcc.target/i386/pr57018.c: New test. 2013-05-02 Vladimir Makarov Backport from mainline 2013-04-18 Jakub Jelinek - PR rtl-optimization/56999 - * g++.dg/opt/pr56999.C: New test. + PR rtl-optimization/56999 + * g++.dg/opt/pr56999.C: New test. 2013-05-02 Vladimir Makarov Backport from mainline 2013-04-19 Vladimir Makarov - PR rtl-optimization/56847 - * gcc.dg/pr56847.c: New test. + PR rtl-optimization/56847 + * gcc.dg/pr56847.c: New test. 2013-05-02 Ian Bolton diff --git a/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/decltype57.C b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/decltype57.C new file mode 100644 index 00000000000..353cc72c335 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/decltype57.C @@ -0,0 +1,8 @@ +// PR c++/58633 +// { dg-do compile { target c++11 } } + +void foo(int i) +{ + typedef int I; + decltype(i.I::~I())* p; +} diff --git a/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum18.C b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum18.C index 306ed8259f9..7361595c00e 100644 --- a/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum18.C +++ b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum18.C @@ -4,5 +4,5 @@ int main(void) { enum e {}; e ev; - ev.e::~e_u(); // { dg-error "e_u. has not been declared" } + ev.e::~e_u(); // { dg-error "" } } diff --git a/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C new file mode 100644 index 00000000000..1d2778fb5ac --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C @@ -0,0 +1,7 @@ +// PR c++/58596 +// { dg-do compile { target c++11 } } + +struct A +{ + int i = [] { return decltype(i)(); }(); +}; diff --git a/gcc-4_8-branch/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc-4_8-branch/gcc/testsuite/g++.dg/diagnostic/pr58979.C new file mode 100644 index 00000000000..6be3f143693 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/g++.dg/diagnostic/pr58979.C @@ -0,0 +1,4 @@ +// PR c++/58979 +// { dg-do compile } + +int i = 0->*0; // { dg-error "invalid type argument of" } diff --git a/gcc-4_8-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C b/gcc-4_8-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C new file mode 100644 index 00000000000..4391159e235 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C @@ -0,0 +1,23 @@ +// { dg-do compile } +// { dg-options "-fno-exceptions -fgnu-tm -O -std=c++0x -fdump-tree-tmlower" } + +struct TrueFalse +{ + static constexpr bool v() { return true; } +}; + +int global; + +template int foo() +{ + return __transaction_atomic noexcept(T::v()) (global + 1); +} + +int f1() +{ + return foo(); +} + +/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */ +/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */ +/* { dg-final { cleanup-tree-dump "tmlower" } } */ diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c b/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c new file mode 100644 index 00000000000..a40cd54d222 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c @@ -0,0 +1,40 @@ +#include + +int a, *b, c, d, f, **i, p, q, *r; +short o, j; + +static int __attribute__((noinline, noclone)) +fn1 (int *p1, int **p2) +{ + int **e = &b; + for (; p; p++) + *p1 = 1; + *e = *p2 = &d; + + assert (r); + + return c; +} + +static int ** __attribute__((noinline, noclone)) +fn2 (void) +{ + for (f = 0; f != 42; f++) + { + int *g[3] = {0, 0, 0}; + for (o = 0; o; o--) + for (; a > 1;) + { + int **h[1] = { &g[2] }; + } + } + return &r; +} + +int +main (void) +{ + i = fn2 (); + fn1 (b, i); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58984.c b/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58984.c new file mode 100644 index 00000000000..e0f7669c78d --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58984.c @@ -0,0 +1,57 @@ +/* PR tree-optimization/58984 */ + +struct S { int f0 : 8; int : 6; int f1 : 5; }; +struct T { char f0; int : 6; int f1 : 5; }; + +int a, *c = &a, e, n, b, m; + +static int +foo (struct S p) +{ + const unsigned short *f[36]; + for (; e < 2; e++) + { + const unsigned short **i = &f[0]; + *c ^= 1; + if (p.f1) + { + *i = 0; + return b; + } + } + return 0; +} + +static int +bar (struct T p) +{ + const unsigned short *f[36]; + for (; e < 2; e++) + { + const unsigned short **i = &f[0]; + *c ^= 1; + if (p.f1) + { + *i = 0; + return b; + } + } + return 0; +} + +int +main () +{ + struct S o = { 1, 1 }; + foo (o); + m = n || o.f0; + if (a != 1) + __builtin_abort (); + e = 0; + struct T p = { 1, 1 }; + bar (p); + m |= n || p.f0; + if (a != 0) + __builtin_abort (); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/atomic-store-6.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/atomic-store-6.c new file mode 100644 index 00000000000..81499cd716b --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/atomic-store-6.c @@ -0,0 +1,13 @@ +/* { dg-do run } */ +/* { dg-require-effective-target sync_int_128_runtime } */ +/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */ + +__int128_t i; + +int main() +{ + __atomic_store_16(&i, -1, 0); + if (i != -1) + __builtin_abort(); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr57518.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr57518.c index 47e819c3e44..dfbdb7ac4b8 100644 --- a/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr57518.c +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr57518.c @@ -1,8 +1,9 @@ -/* PR rtl-optimization/57130 */ +/* PR rtl-optimization/57518 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-rtl-ira" } */ -/* { dg-final { scan-rtl-dump-not "REG_EQUIV\[^\n\]*mem\[^\n\]*\"ip\"" "ira" } } */ +/* { dg-final { scan-rtl-dump-not "REG_EQUIV\[^\n\]*mem\[^\n\]*\"ip\"\[^\n\]*subreg" "ira" } } */ + char ip[10]; int total; diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58805.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58805.c new file mode 100644 index 00000000000..dda0e4bdf4b --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58805.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */ + +/* Type that matches the 'p' constraint. */ +#define TYPE void * + +static inline +void bar (TYPE *r) +{ + TYPE t; + __asm__ ("" : "=&p" (t), "=p" (*r)); +} + +void +foo (int n, TYPE *x, TYPE *y) +{ + if (n == 0) + bar (x); + else + bar (y); +} + +/* { dg-final { scan-tree-dump-times "__asm__" 2 "pre"} } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57488.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57488.c new file mode 100644 index 00000000000..7eda36476e7 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57488.c @@ -0,0 +1,58 @@ +/* { dg-do run } */ + +extern void abort (void); + +int i, j, *pj = &j, **ppj = &pj; +int x, *px = &x; + +short s, *ps = &s, k; + +unsigned short u, *pu = &u, **ppu = &pu; + +char c, *pc = &c; + +unsigned char v = 48; + +static int +bar (int p) +{ + p = k; + *px = **ppu = i; + *ppj = &p; + if (**ppj) + *pj = p; + return p; +} + +void __attribute__((noinline)) +foo () +{ + for (; i <= 3; i++) + for (; j; j--); + + u ^= bar (*pj); + + for (k = 1; k >= 0; k--) + { + int l; + bar (0); + for (l = 1; l < 5; l++) + { + int m; + for (m = 6; m; m--) + { + v--; + *ps = *pc; + } + } + } +} + +int +main () +{ + foo (); + if (v != 0) + abort (); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58079.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58079.c new file mode 100644 index 00000000000..99a30181f1e --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58079.c @@ -0,0 +1,107 @@ +/* { dg-options "-mlong-calls" { target mips*-*-* } } */ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int __kernel_size_t; +typedef __kernel_size_t size_t; +struct list_head { + struct list_head *next; +}; + +struct dmx_ts_feed { + int is_filtering; +}; +struct dmx_section_feed { + u16 secbufp; + u16 seclen; + u16 tsfeedp; +}; + +typedef int (*dmx_ts_cb) ( + const u8 * buffer1, + size_t buffer1_length, + const u8 * buffer2, + size_t buffer2_length +); + +struct dvb_demux_feed { + union { + struct dmx_ts_feed ts; + struct dmx_section_feed sec; + } feed; + union { + dmx_ts_cb ts; + } cb; + int type; + u16 pid; + int ts_type; + struct list_head list_head; +}; + +struct dvb_demux { + int (*stop_feed)(struct dvb_demux_feed *feed); + struct list_head feed_list; +}; + + +static +inline +__attribute__((always_inline)) +u8 +payload(const u8 *tsp) +{ + if (tsp[3] & 0x20) { + return 184 - 1 - tsp[4]; + } + return 184; +} + +static +inline +__attribute__((always_inline)) +int +dvb_dmx_swfilter_payload(struct dvb_demux_feed *feed, const u8 *buf) +{ + int count = payload(buf); + int p; + if (count == 0) + return -1; + return feed->cb.ts(&buf[p], count, ((void *)0), 0); +} + +static +inline +__attribute__((always_inline)) +void +dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, const u8 *buf) +{ + switch (feed->type) { + case 0: + if (feed->ts_type & 1) { + dvb_dmx_swfilter_payload(feed, buf); + } + if (dvb_dmx_swfilter_section_packet(feed, buf) < 0) + feed->feed.sec.seclen = feed->feed.sec.secbufp = 0; + } +} + +static +void +dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) +{ + struct dvb_demux_feed *feed; + int dvr_done = 0; + + for (feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = ((&demux->feed_list)->next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );}); __builtin_prefetch(feed->list_head.next), &feed->list_head != (&demux->feed_list); feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = (feed->list_head.next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );})) { + if (((((feed)->type == 0) && ((feed)->feed.ts.is_filtering) && (((feed)->ts_type & (1 | 8)) == 1))) && (dvr_done++)) + dvb_dmx_swfilter_packet_type(feed, buf); + else if (feed->pid == 0x2000) + feed->cb.ts(buf, 188, ((void *)0), 0); + } +} +void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count) +{ + while (count--) { + dvb_dmx_swfilter_packet(demux, buf); + } +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58670.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58670.c index e4536cc330f..ba9fce71f9e 100644 --- a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58670.c +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58670.c @@ -2,7 +2,7 @@ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ #if defined (__i386__) || defined (__x86_64__) -#define ASM_STR "bts $1, %0; jc %l[lab]" +#define ASM_STR "btsl $1, %0; jc %l[lab]" #endif __attribute__((noinline, noclone)) int diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58779.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58779.c new file mode 100644 index 00000000000..b0c0c869513 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58779.c @@ -0,0 +1,12 @@ +/* { dg-do run } */ + +int a, c; + +int main () +{ + int e = -1; + short d = (c <= 0) ^ e; + if ((unsigned int) a - (a || d) <= (unsigned int) a) + __builtin_abort (); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58830.c b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58830.c new file mode 100644 index 00000000000..8081f8b2c27 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58830.c @@ -0,0 +1,42 @@ +/* { dg-do run } */ +/* { dg-additional-options "-ftree-pre -ftree-partial-pre" } */ + +extern void abort (void); + +int b, c, d, f, g, h, i, j[6], *l = &b, *m, n, *o, r; +char k; + +static int +foo () +{ + char *p = &k; + + for (; d; d++) + if (i) + h = 0; + else + h = c || (r = 0); + + for (f = 0; f < 2; f++) + { + unsigned int q; + *l = 0; + if (n) + *m = g; + if (g) + o = 0; + for (q = -8; q >= 5; q++) + (*p)--; + } + + return 0; +} + +int +main () +{ + foo (); + if (j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ^ (k & 15)] != 0) + abort (); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c new file mode 100644 index 00000000000..bd85e8640c2 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-g -fPIC" } */ + +void *v; +void a (void *x) { } +void b (void) { } + /* line 7. */ +int /* line 8. */ +main (int argc) /* line 9. */ +{ /* line 10. */ + if (argc == 12345) /* line 11. */ + { + a (v); + return 1; + } + b (); + + return 0; +} + +/* { dg-final { scan-assembler-not "\.loc 1 7 0" } } */ +/* { dg-final { scan-assembler-not "\.loc 1 8 0" } } */ +/* { dg-final { scan-assembler-not "\.loc 1 9 0" } } */ + +/* The loc at the start of the prologue. */ +/* { dg-final { scan-assembler-times "\.loc 1 10 0" 1 } } */ + +/* The loc at the end of the prologue, with the first user line. */ +/* { dg-final { scan-assembler-times "\.loc 1 11 0" 1 } } */ diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr30315.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr30315.c index 998d5071e5c..557b4f75174 100644 --- a/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr30315.c +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr30315.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-times "cmp" 4 } } */ +/* { dg-final { scan-assembler-not "cmp" } } */ extern void abort (void); int c; @@ -34,39 +34,10 @@ void pluscconly##t##C (T a, T b) \ } #define PLUSCCONLY(T, t) PLUSCCONLY1(T, t, a) PLUSCCONLY1(T, t, b) -#define MINUSCC(T, t) \ -T minuscc##t (T a, T b) \ -{ \ - T difference = a - b; \ - if (difference > a) \ - abort (); \ - return difference; \ -} - -#define DECCC(T, t) \ -T deccc##t (T a, T b) \ -{ \ - T difference = a - b; \ - if (difference > a) \ - c --; \ - return difference; \ -} - -#define MINUSCCONLY(T, t) \ -void minuscconly##t (T a, T b) \ -{ \ - T difference = a - b; \ - if (difference > a) \ - abort (); \ -} - #define TEST(T, t) \ PLUSCC(T, t) \ PLUSCCONLY(T, t) \ - INCCC(T, t) \ - MINUSCC(T, t) \ - MINUSCCONLY(T, t) \ - DECCC(T, t) + INCCC(T, t) TEST (unsigned long, l) TEST (unsigned int, i) @@ -84,14 +55,3 @@ unsigned long pluscczext##C (unsigned int a, unsigned int b) \ PLUSCCZEXT(a) PLUSCCZEXT(b) - -#define MINUSCCZEXT \ -unsigned long minuscczext (unsigned int a, unsigned int b) \ -{ \ - unsigned int difference = a - b; \ - if (difference > a) \ - abort (); \ - return difference; \ -} - -MINUSCCZEXT diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr58690.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr58690.c new file mode 100644 index 00000000000..87a87cc9c90 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr58690.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target { ! { ia32 } } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-O2 -mx32 -maddress-mode=short" } */ + +struct gomp_thread +{ + char foo[41]; +}; +extern __thread struct gomp_thread gomp_tls_data; +void +foo (void) +{ + __builtin_memset (&gomp_tls_data, '\0', sizeof (gomp_tls_data)); +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-1.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-1.c new file mode 100644 index 00000000000..1f4c4e04a23 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-1.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target { ! { ia32 } } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=short" } */ + +extern int foo(int, ...); +int bar(void) { + long double l = 1.2345E6; + foo(0, l); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-2.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-2.c new file mode 100644 index 00000000000..14e594ba608 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr59034-2.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target { ! { ia32 } } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=long" } */ + +extern int foo(int, ...); +int bar(void) { + long double l = 1.2345E6; + foo(0, l); + return 0; +} diff --git a/gcc-4_8-branch/gcc/testsuite/gcc.target/sh/pr54089-3.c b/gcc-4_8-branch/gcc/testsuite/gcc.target/sh/pr54089-3.c index ffb976ba11b..3fb0f7a9aea 100644 --- a/gcc-4_8-branch/gcc/testsuite/gcc.target/sh/pr54089-3.c +++ b/gcc-4_8-branch/gcc/testsuite/gcc.target/sh/pr54089-3.c @@ -5,7 +5,7 @@ /* { dg-options "-O1" } */ /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m1*" "-m2" "-m2e*" } } */ /* { dg-final { scan-assembler-not "and" } } */ -/* { dg-final { scan-assembler-not "31" } } */ +/* { dg-final { scan-assembler-not "#31" } } */ int test00 (unsigned int a, int* b, int c, int* d, unsigned int e) diff --git a/gcc-4_8-branch/gcc/testsuite/gfortran.dg/extends_15.f90 b/gcc-4_8-branch/gcc/testsuite/gfortran.dg/extends_15.f90 new file mode 100644 index 00000000000..06c31799a00 --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gfortran.dg/extends_15.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! +! PR 58355: [4.7/4.8/4.9 Regression] [F03] ICE with TYPE, EXTENDS before parent TYPE defined +! +! Contributed by Andrew Benson + +module ct + public :: t1 + + type, extends(t1) :: t2 ! { dg-error "has not been previously defined" } + + type :: t1 + end type +end + +! { dg-final { cleanup-modules "ct" } } diff --git a/gcc-4_8-branch/gcc/testsuite/gfortran.dg/reshape_6.f90 b/gcc-4_8-branch/gcc/testsuite/gfortran.dg/reshape_6.f90 new file mode 100644 index 00000000000..149f31efe7a --- /dev/null +++ b/gcc-4_8-branch/gcc/testsuite/gfortran.dg/reshape_6.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! PR fortran/58989 +! +program test + + real(8), dimension(4,4) :: fluxes + real(8), dimension(2,2,2,2) :: f + integer, dimension(3) :: dmmy + integer, parameter :: indx(4)=(/2,2,2,2/) + + fluxes = 1 + + dmmy = (/2,2,2/) + + f = reshape(fluxes,(/dmmy,2/)) ! Caused an ICE + f = reshape(fluxes,(/2,2,2,2/)) ! Works as expected + f = reshape(fluxes,indx) ! Works as expected + +end program test diff --git a/gcc-4_8-branch/gcc/tree-ssa-pre.c b/gcc-4_8-branch/gcc/tree-ssa-pre.c index 10c8091758e..3e6a82e24ab 100644 --- a/gcc-4_8-branch/gcc/tree-ssa-pre.c +++ b/gcc-4_8-branch/gcc/tree-ssa-pre.c @@ -3664,6 +3664,12 @@ insert (void) if (dump_file && dump_flags & TDF_DETAILS) fprintf (dump_file, "Starting insert iteration %d\n", num_iterations); new_stuff = insert_aux (ENTRY_BLOCK_PTR); + + /* Clear the NEW sets before the next iteration. We have already + fully propagated its contents. */ + if (new_stuff) + FOR_ALL_BB (bb) + bitmap_set_free (NEW_SETS (bb)); } statistics_histogram_event (cfun, "insert iterations", num_iterations); } diff --git a/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c b/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c index b20d3067d66..419b4ec024e 100644 --- a/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c +++ b/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c @@ -297,7 +297,8 @@ stmt_local_def (gimple stmt) tree val; def_operand_p def_p; - if (gimple_has_side_effects (stmt)) + if (gimple_has_side_effects (stmt) + || gimple_vdef (stmt) != NULL_TREE) return false; def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF); diff --git a/gcc-4_8-branch/gnattools/ChangeLog b/gcc-4_8-branch/gnattools/ChangeLog index d23ba167e99..9d32bb0f55b 100644 --- a/gcc-4_8-branch/gnattools/ChangeLog +++ b/gcc-4_8-branch/gnattools/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/include/ChangeLog b/gcc-4_8-branch/include/ChangeLog index 9214e88ad1a..e854fd3d033 100644 --- a/gcc-4_8-branch/include/ChangeLog +++ b/gcc-4_8-branch/include/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/intl/ChangeLog b/gcc-4_8-branch/intl/ChangeLog index 9805d5ddb6d..2a0c547247c 100644 --- a/gcc-4_8-branch/intl/ChangeLog +++ b/gcc-4_8-branch/intl/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libada/ChangeLog b/gcc-4_8-branch/libada/ChangeLog index 3189396bc15..5ea5f1cd967 100644 --- a/gcc-4_8-branch/libada/ChangeLog +++ b/gcc-4_8-branch/libada/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libatomic/ChangeLog b/gcc-4_8-branch/libatomic/ChangeLog index 61643f1917a..b4492695bcf 100644 --- a/gcc-4_8-branch/libatomic/ChangeLog +++ b/gcc-4_8-branch/libatomic/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libbacktrace/ChangeLog b/gcc-4_8-branch/libbacktrace/ChangeLog index a7ea8c54aeb..5046ccbe136 100644 --- a/gcc-4_8-branch/libbacktrace/ChangeLog +++ b/gcc-4_8-branch/libbacktrace/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libcpp/ChangeLog b/gcc-4_8-branch/libcpp/ChangeLog index 543e24fb703..c50f73cc1d5 100644 --- a/gcc-4_8-branch/libcpp/ChangeLog +++ b/gcc-4_8-branch/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libcpp/po/ChangeLog b/gcc-4_8-branch/libcpp/po/ChangeLog index fc7b0a6d47a..f183084b9ad 100644 --- a/gcc-4_8-branch/libcpp/po/ChangeLog +++ b/gcc-4_8-branch/libcpp/po/ChangeLog @@ -1,3 +1,11 @@ +2013-11-01 Joseph Myers + + * tr.po: Update. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-03 Joseph Myers * sr.po: Update. diff --git a/gcc-4_8-branch/libcpp/po/tr.po b/gcc-4_8-branch/libcpp/po/tr.po index a25bc8ff75d..7e63bd1d9f9 100644 --- a/gcc-4_8-branch/libcpp/po/tr.po +++ b/gcc-4_8-branch/libcpp/po/tr.po @@ -1,20 +1,22 @@ # Turkish translations for cpplib messages. # Copyright (C) 2007 Free Software Foundation, Inc. +# This file is distributed under the same license as the gcc package. # # Nilgün Belma Bugüner , 2001, ..., 2007. +# Volkan Gezer , 2013. msgid "" msgstr "" -"Project-Id-Version: cpplib 4.2.0\n" +"Project-Id-Version: cpplib 4.8.0\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" -"POT-Creation-Date: 2013-02-24 01:05+0000\n" -"PO-Revision-Date: 2007-05-23 01:17+0300\n" -"Last-Translator: Nilgün Belma Bugüner \n" +"POT-Creation-Date: 2013-03-15 17:42+0000\n" +"PO-Revision-Date: 2013-11-01 22:29+0100\n" +"Last-Translator: Volkan Gezer \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: charset.c:673 @@ -121,10 +123,9 @@ msgid "non-ISO-standard escape sequence, '\\%c'" msgstr "ISO standardı olmayan önceleme dizgesi, '\\%c'" #: charset.c:1320 -#, fuzzy, c-format -#| msgid "unknown escape sequence '\\%c'" +#, c-format msgid "unknown escape sequence: '\\%c'" -msgstr "bilinmeyen önceleme dizgesi '\\%c'" +msgstr "bilinmeyen kaçış dizgesi: '\\%c'" #: charset.c:1328 #, c-format @@ -163,10 +164,9 @@ msgid "#%s is a GCC extension" msgstr "#%s bir GCC uzantısıdır" #: directives.c:362 -#, fuzzy, c-format -#| msgid "#%s is a GCC extension" +#, c-format msgid "#%s is a deprecated GCC extension" -msgstr "#%s bir GCC uzantısıdır" +msgstr "#%s eskimiş bir GCC uzantısıdır" #: directives.c:375 msgid "suggest not using #elif in traditional C" @@ -247,7 +247,7 @@ msgstr "satır yönergesinde geçersiz \"%s\" seçeneği" #: directives.c:909 msgid "unexpected end of file after #line" -msgstr "" +msgstr "#line satırından sonra beklenmeyen dosya sonu" #: directives.c:912 #, c-format @@ -271,7 +271,7 @@ msgstr "#'dan sonraki \"%s\" bir pozitif tamsayı değil" #: directives.c:1068 directives.c:1070 directives.c:1072 directives.c:1658 #, c-format msgid "%s" -msgstr "" +msgstr "%s" #: directives.c:1096 #, c-format @@ -312,16 +312,12 @@ msgid "#pragma once in main file" msgstr "main dosyasında '#pragma once'" #: directives.c:1462 -#, fuzzy -#| msgid "invalid #pragma GCC poison directive" msgid "invalid #pragma push_macro directive" -msgstr "geçersiz #pragma GCC poison yönergesi" +msgstr "geçersiz #pragma güdümlü_makro yönergesi" #: directives.c:1517 -#, fuzzy -#| msgid "invalid #pragma GCC poison directive" msgid "invalid #pragma pop_macro directive" -msgstr "geçersiz #pragma GCC poison yönergesi" +msgstr "geçersiz #pragma güdümlü_makro yönergesi" #: directives.c:1572 msgid "invalid #pragma GCC poison directive" @@ -347,10 +343,9 @@ msgid "current file is older than %s" msgstr "mevcut dosya %s den daha eski" #: directives.c:1653 -#, fuzzy, c-format -#| msgid "invalid #pragma GCC poison directive" +#, c-format msgid "invalid \"#pragma GCC %s\" directive" -msgstr "geçersiz #pragma GCC poison yönergesi" +msgstr "geçersiz \"#pragma GCC %s\" yönergesi" #: directives.c:1847 msgid "_Pragma takes a parenthesized string literal" @@ -405,7 +400,7 @@ msgstr "dayanak bir tanımlayıcı olmalı" msgid "\"%s\" re-asserted" msgstr "\"%s\" tekrar olumlanmış" -#: directives.c:2566 +#: directives.c:2567 #, c-format msgid "unterminated #%s" msgstr "sonlandırılmamış #%s" @@ -424,16 +419,12 @@ msgid "%s: %s" msgstr "%s: %s" #: expr.c:479 expr.c:577 -#, fuzzy -#| msgid "imaginary constants are a GCC extension" msgid "fixed-point constants are a GCC extension" -msgstr "sanal sabitler bir GCC genişletmesidir" +msgstr "sabit noktalı sabitler bir GCC uzantısıdır" #: expr.c:504 -#, fuzzy -#| msgid "invalid suffix \"%.*s\" on floating constant" msgid "invalid prefix \"0b\" for floating constant" -msgstr "gerçel sabitin \"%.*s\" soneki geçersiz" +msgstr "kayan nokta için geçerisz \"0b\" öntakısı" #: expr.c:514 msgid "use of C99 hexadecimal floating constant" @@ -450,10 +441,8 @@ msgid "traditional C rejects the \"%.*s\" suffix" msgstr "geleneksel C \"%.*s\" sonekini kullanmaz" #: expr.c:564 -#, fuzzy -#| msgid "imaginary constants are a GCC extension" msgid "suffix for double constant is a GCC extension" -msgstr "sanal sabitler bir GCC genişletmesidir" +msgstr "çift sabit için öntakı bir GCC uzantısıdır" #: expr.c:570 #, c-format @@ -461,10 +450,8 @@ msgid "invalid suffix \"%.*s\" with hexadecimal floating constant" msgstr "onaltılık kayan sabitli \"%.*s\" soneki geçersiz" #: expr.c:581 -#, fuzzy -#| msgid "imaginary constants are a GCC extension" msgid "decimal float constants are a GCC extension" -msgstr "sanal sabitler bir GCC genişletmesidir" +msgstr "onluk kayan sabitler bir GCC uzantısıdır" #: expr.c:599 #, c-format @@ -472,10 +459,8 @@ msgid "invalid suffix \"%.*s\" on integer constant" msgstr "tamsayı sabitte sonek \"%.*s\" soneki geçersiz" #: expr.c:624 -#, fuzzy -#| msgid "use of C99 long long integer constant" msgid "use of C++0x long long integer constant" -msgstr "ISO C99 long long tamsayı sabitleri yasaklar" +msgstr "ISO C++0x long long tamsayı sabitlerinin kullanımı" #: expr.c:625 msgid "use of C99 long long integer constant" @@ -486,10 +471,8 @@ msgid "imaginary constants are a GCC extension" msgstr "sanal sabitler bir GCC genişletmesidir" #: expr.c:644 -#, fuzzy -#| msgid "imaginary constants are a GCC extension" msgid "binary constants are a GCC extension" -msgstr "sanal sabitler bir GCC genişletmesidir" +msgstr "ikili sabitler bir GCC uzantısıdır" #: expr.c:737 msgid "integer constant is too large for its type" @@ -517,10 +500,8 @@ msgid "this use of \"defined\" may not be portable" msgstr "\"defined\" bu kullanımıyla uyarlanabilir olmayabilir" #: expr.c:948 -#, fuzzy -#| msgid "integer overflow in preprocessor expression" msgid "user-defined literal in preprocessor expression" -msgstr "önişlemci ifadesinde tamsayı taşması" +msgstr "önişleyici ifadesinde kullanıcı tanımlı bağımlı" #: expr.c:953 msgid "floating constant in preprocessor expression" @@ -536,20 +517,17 @@ msgid "\"%s\" is not defined" msgstr "\"%s\" tanımlı değil" #: expr.c:1020 -#, fuzzy -#| msgid "#%s is a GCC extension" msgid "assertions are a GCC extension" -msgstr "#%s bir GCC uzantısıdır" +msgstr "belirteçler bir GCC uzantısıdır" #: expr.c:1023 msgid "assertions are a deprecated extension" -msgstr "" +msgstr "belirteçler artık kullanılmayan bir ifadedir" #: expr.c:1268 -#, fuzzy, c-format -#| msgid "unbalanced stack in #if" +#, c-format msgid "unbalanced stack in %s" -msgstr "#if ifadesinde karşılıksız yığın" +msgstr "%s içinde dengelenmemiş yığın" #: expr.c:1288 #, c-format @@ -594,39 +572,39 @@ msgstr "#if'in teriminde virgül" msgid "division by zero in #if" msgstr "#if içinde sıfırla bölme" -#: files.c:504 +#: files.c:505 msgid "NULL directory in find_file" msgstr "find_file içinde boş dizin" -#: files.c:542 +#: files.c:553 msgid "one or more PCH files were found, but they were invalid" msgstr "bir veya daha fazla PCH dosyası bulundu ama bunlar geçersiz" -#: files.c:545 +#: files.c:556 msgid "use -Winvalid-pch for more information" msgstr "daha fazla bilgi almak için -Winvalid-pch kullanın" -#: files.c:643 +#: files.c:660 #, c-format msgid "%s is a block device" msgstr "%s bir blok aygıtıdır" -#: files.c:660 +#: files.c:677 #, c-format msgid "%s is too large" msgstr "%s çok büyük" -#: files.c:700 +#: files.c:717 #, c-format msgid "%s is shorter than expected" msgstr "%s beklenenden daha kısa" -#: files.c:935 +#: files.c:953 #, c-format msgid "no include path in which to search for %s" msgstr "%s için aranacaklar içinde başlık dosyaları yolu yok" -#: files.c:1363 +#: files.c:1381 msgid "Multiple include guards may be useful for:\n" msgstr "Çoklu include önlemleri aşağıdakiler için kullanışlı olabilir:\n" @@ -717,27 +695,24 @@ msgstr "__VA_ARGS__ sadece argümanlarının sayısı değişebilen bir C99 mak #: lex.c:1178 lex.c:1255 #, c-format msgid "identifier \"%s\" is a special operator name in C++" -msgstr "" +msgstr "\"%s\" belirteci, C++'da özel bir işleç adıdır" #: lex.c:1399 msgid "raw string delimiter longer than 16 characters" -msgstr "" +msgstr "ham dizge ayracı 16 karakterden uzun" #: lex.c:1402 -#, fuzzy, c-format -#| msgid "universal character %.*s is not valid in an identifier" +#, c-format msgid "invalid character '%c' in raw string delimiter" -msgstr "evrensel karakter %.*s bir belirteç içinde geçerli değil" +msgstr "ham dizge ayracında geçersiz karakter '%c'" #: lex.c:1525 lex.c:1547 -#, fuzzy -#| msgid "unterminated #%s" msgid "unterminated raw string" -msgstr "sonlandırılmamış #%s" +msgstr "bitirilmemiş ham dizge" #: lex.c:1573 lex.c:1706 msgid "invalid suffix on literal; C++11 requires a space between literal and identifier" -msgstr "" +msgstr "geçersiz ifade soneki; C++11 ifade ve tanımlayıcı arasında bir boşluk gerektirir" #: lex.c:1684 msgid "null character(s) preserved in literal" @@ -785,7 +760,7 @@ msgstr "tarih ve saat saptanamadı" #: macro.c:377 msgid "__COUNTER__ expanded inside directive with -fdirectives-only" -msgstr "" +msgstr "__COUNTER__ -fdirectives-only ile talimat içerisinde genişletildi" #: macro.c:535 msgid "invalid string literal, ignoring final '\\'" @@ -823,7 +798,7 @@ msgstr "işlev benzeri makro \"%s\" geleneksel C'de argümanlarla kullanılmalı #: macro.c:1746 #, c-format msgid "invoking macro %s argument %d: empty macro arguments are undefined in ISO C90 and ISO C++98" -msgstr "" +msgstr "%s makrosu %d argümanı uygulanıyor: ISO C90 ve ISO C++98 içerisinde boş makro argümanları tanımsızdır" #: macro.c:2708 #, c-format @@ -890,38 +865,36 @@ msgstr "makro argümanı \"%s\" geleneksel C'de dizgelenmiş olmalıydı" msgid "invalid hash type %d in cpp_macro_definition" msgstr "cpp_macro_definition içindeki isimli yapı türü %d geçersiz" -#: pch.c:87 pch.c:335 pch.c:347 pch.c:365 pch.c:371 pch.c:380 pch.c:387 +#: pch.c:87 pch.c:345 pch.c:359 pch.c:377 pch.c:383 pch.c:392 pch.c:399 msgid "while writing precompiled header" msgstr "önderlemeli başlık yazılırken" -#: pch.c:607 -#, fuzzy, c-format -#| msgid "%s: not used because `%s' is defined" +#: pch.c:619 +#, c-format msgid "%s: not used because `%.*s' is poisoned" -msgstr "%s: `%s' tanımlı olduğundan kullanılmadı" +msgstr "%s: `%.*s' zehirli olduğu için kullanılmadı" -#: pch.c:629 +#: pch.c:641 #, c-format msgid "%s: not used because `%.*s' not defined" msgstr "%s: `%.*s' tanımlı olmadığından kullanılmadı" -#: pch.c:641 +#: pch.c:653 #, c-format msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'" msgstr "%s: `%.*s' kullanılmadı çünkü `%s' olarak tanımlı, `%.*s' değil" -#: pch.c:682 +#: pch.c:694 #, c-format msgid "%s: not used because `%s' is defined" msgstr "%s: `%s' tanımlı olduğundan kullanılmadı" -#: pch.c:702 -#, fuzzy, c-format -#| msgid "%s: not used because `%s' is defined" +#: pch.c:714 +#, c-format msgid "%s: not used because `__COUNTER__' is invalid" -msgstr "%s: `%s' tanımlı olduğundan kullanılmadı" +msgstr "%s: `__COUNTER__' geçersiz olduğundan kullanılmadı" -#: pch.c:711 pch.c:886 +#: pch.c:723 pch.c:898 msgid "while reading precompiled header" msgstr "önderlemeli başlık okunurken" diff --git a/gcc-4_8-branch/libdecnumber/ChangeLog b/gcc-4_8-branch/libdecnumber/ChangeLog index 8f6557bab1f..0d20380aa3f 100644 --- a/gcc-4_8-branch/libdecnumber/ChangeLog +++ b/gcc-4_8-branch/libdecnumber/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libffi/ChangeLog b/gcc-4_8-branch/libffi/ChangeLog index fe0453a4994..048d1fc9f52 100644 --- a/gcc-4_8-branch/libffi/ChangeLog +++ b/gcc-4_8-branch/libffi/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-06-25 Alan Modra * src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration diff --git a/gcc-4_8-branch/libgcc/ChangeLog b/gcc-4_8-branch/libgcc/ChangeLog index 4ef529f27b7..ea360dda257 100644 --- a/gcc-4_8-branch/libgcc/ChangeLog +++ b/gcc-4_8-branch/libgcc/ChangeLog @@ -1,3 +1,25 @@ +2013-11-10 Kai Tietz + + Back-merged from trunk + * config/i386/cygming-crtbegin.c (__gcc_register_frame): + Increment load-count on use of LIBGCC_SONAME DLL. + (hmod_libgcc): New static variable to hold handle of + LIBGCC_SONAME DLL. + (__gcc_deregister_frame): Decrement load-count of + LIBGCC_SONAME DLL. + +2013-11-07 Uros Bizjak + + * config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Handle + FP_EX_DENORM. Store result to volatile location after SSE division + to close interrupt window. Remove unneeded fwait after x87 + division since interrupt window will be closed by emitted fstp. + Rewrite FP_EX_INEXACT handling. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-08-01 Maxim Kuvyrkov Backport from trunk: Fix licenses on several libgcc files. diff --git a/gcc-4_8-branch/libgcc/config/i386/cygming-crtbegin.c b/gcc-4_8-branch/libgcc/config/i386/cygming-crtbegin.c index 6a513cb3f0d..ed1d23f3e3f 100644 --- a/gcc-4_8-branch/libgcc/config/i386/cygming-crtbegin.c +++ b/gcc-4_8-branch/libgcc/config/i386/cygming-crtbegin.c @@ -69,6 +69,9 @@ static EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] = { }; static struct object obj; + +/* Handle of libgcc's DLL reference. */ +HANDLE hmod_libgcc; #endif #if TARGET_USE_JCR_SECTION @@ -93,9 +96,14 @@ __gcc_register_frame (void) void (*register_frame_fn) (const void *, struct object *); HANDLE h = GetModuleHandle (LIBGCC_SONAME); + if (h) - register_frame_fn = (void (*) (const void *, struct object *)) - GetProcAddress (h, "__register_frame_info"); + { + /* Increasing the load-count of LIBGCC_SONAME DLL. */ + hmod_libgcc = LoadLibrary (LIBGCC_SONAME); + register_frame_fn = (void (*) (const void *, struct object *)) + GetProcAddress (h, "__register_frame_info"); + } else register_frame_fn = __register_frame_info; if (register_frame_fn) @@ -132,5 +140,7 @@ __gcc_deregister_frame (void) deregister_frame_fn = __deregister_frame_info; if (deregister_frame_fn) deregister_frame_fn (__EH_FRAME_BEGIN__); + if (hmod_libgcc) + FreeLibrary (hmod_libgcc); #endif } diff --git a/gcc-4_8-branch/libgcc/config/i386/sfp-exceptions.c b/gcc-4_8-branch/libgcc/config/i386/sfp-exceptions.c index fbaaab22f50..3504c4aedd1 100644 --- a/gcc-4_8-branch/libgcc/config/i386/sfp-exceptions.c +++ b/gcc-4_8-branch/libgcc/config/i386/sfp-exceptions.c @@ -48,20 +48,32 @@ __sfp_handle_exceptions (int _fex) { float f = 0.0f; #ifdef __x86_64__ + volatile float r __attribute__ ((unused)); asm volatile ("%vdivss\t{%0, %d0|%d0, %0}" : "+x" (f)); + r = f; /* Needed to trigger exception. */ #else asm volatile ("fdiv\t{%y0, %0|%0, %y0}" : "+t" (f)); - asm volatile ("fwait"); + /* No need for fwait, exception is triggered by emitted fstp. */ #endif } + if (_fex & FP_EX_DENORM) + { + struct fenv temp; + asm volatile ("fnstenv\t%0" : "=m" (temp)); + temp.__status_word |= FP_EX_DENORM; + asm volatile ("fldenv\t%0" : : "m" (temp)); + asm volatile ("fwait"); + } if (_fex & FP_EX_DIVZERO) { float f = 1.0f, g = 0.0f; #ifdef __x86_64__ + volatile float r __attribute__ ((unused)); asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); + r = f; /* Needed to trigger exception. */ #else asm volatile ("fdivs\t%1" : "+t" (f) : "m" (g)); - asm volatile ("fwait"); + /* No need for fwait, exception is triggered by emitted fstp. */ #endif } if (_fex & FP_EX_OVERFLOW) @@ -82,11 +94,15 @@ __sfp_handle_exceptions (int _fex) } if (_fex & FP_EX_INEXACT) { - struct fenv temp; - asm volatile ("fnstenv\t%0" : "=m" (temp)); - temp.__status_word |= FP_EX_INEXACT; - asm volatile ("fldenv\t%0" : : "m" (temp)); - asm volatile ("fwait"); + float f = 1.0f, g = 3.0f; +#ifdef __x86_64__ + volatile float r __attribute__ ((unused)); + asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); + r = f; /* Needed to trigger exception. */ +#else + asm volatile ("fdivs\t%1" : "+t" (f) : "m" (g)); + /* No need for fwait, exception is triggered by emitted fstp. */ +#endif } }; #endif diff --git a/gcc-4_8-branch/libgcc/config/libbid/ChangeLog b/gcc-4_8-branch/libgcc/config/libbid/ChangeLog index 3e25c4cadd1..c1f04e8458f 100644 --- a/gcc-4_8-branch/libgcc/config/libbid/ChangeLog +++ b/gcc-4_8-branch/libgcc/config/libbid/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libgfortran/ChangeLog b/gcc-4_8-branch/libgfortran/ChangeLog index a20f5bb8092..cd7a210e56c 100644 --- a/gcc-4_8-branch/libgfortran/ChangeLog +++ b/gcc-4_8-branch/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-04 Tobias Burnus PR fortran/55469 diff --git a/gcc-4_8-branch/libgo/Makefile.am b/gcc-4_8-branch/libgo/Makefile.am index c81c66cb07f..957f23ced9f 100644 --- a/gcc-4_8-branch/libgo/Makefile.am +++ b/gcc-4_8-branch/libgo/Makefile.am @@ -424,6 +424,7 @@ runtime_files = \ runtime/go-caller.c \ runtime/go-callers.c \ runtime/go-can-convert-interface.c \ + runtime/go-cdiv.c \ runtime/go-cgo.c \ runtime/go-check-interface.c \ runtime/go-construct-map.c \ diff --git a/gcc-4_8-branch/libgo/Makefile.in b/gcc-4_8-branch/libgo/Makefile.in index 9e31e8ca28e..706a72e1d82 100644 --- a/gcc-4_8-branch/libgo/Makefile.in +++ b/gcc-4_8-branch/libgo/Makefile.in @@ -195,7 +195,7 @@ libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ @LIBGO_IS_LINUX_TRUE@am__objects_5 = getncpu-linux.lo am__objects_6 = go-append.lo go-assert.lo go-assert-interface.lo \ go-byte-array-to-string.lo go-breakpoint.lo go-caller.lo \ - go-callers.lo go-can-convert-interface.lo go-cgo.lo \ + go-callers.lo go-can-convert-interface.lo go-cdiv.lo go-cgo.lo \ go-check-interface.lo go-construct-map.lo \ go-convert-interface.lo go-copy.lo go-defer.lo \ go-deferred-recover.lo go-eface-compare.lo \ @@ -757,6 +757,7 @@ runtime_files = \ runtime/go-caller.c \ runtime/go-callers.c \ runtime/go-can-convert-interface.c \ + runtime/go-cdiv.c \ runtime/go-cgo.c \ runtime/go-check-interface.c \ runtime/go-construct-map.c \ @@ -2368,6 +2369,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-caller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-callers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-can-convert-interface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-cdiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-cgo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-check-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-construct-map.Plo@am__quote@ @@ -2554,6 +2556,13 @@ go-can-convert-interface.lo: runtime/go-can-convert-interface.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-can-convert-interface.lo `test -f 'runtime/go-can-convert-interface.c' || echo '$(srcdir)/'`runtime/go-can-convert-interface.c +go-cdiv.lo: runtime/go-cdiv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-cdiv.lo -MD -MP -MF $(DEPDIR)/go-cdiv.Tpo -c -o go-cdiv.lo `test -f 'runtime/go-cdiv.c' || echo '$(srcdir)/'`runtime/go-cdiv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/go-cdiv.Tpo $(DEPDIR)/go-cdiv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/go-cdiv.c' object='go-cdiv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-cdiv.lo `test -f 'runtime/go-cdiv.c' || echo '$(srcdir)/'`runtime/go-cdiv.c + go-cgo.lo: runtime/go-cgo.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-cgo.lo -MD -MP -MF $(DEPDIR)/go-cgo.Tpo -c -o go-cgo.lo `test -f 'runtime/go-cgo.c' || echo '$(srcdir)/'`runtime/go-cgo.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/go-cgo.Tpo $(DEPDIR)/go-cgo.Plo diff --git a/gcc-4_8-branch/libgo/config.h.in b/gcc-4_8-branch/libgo/config.h.in index 1057d9e85e4..f6da8b982c4 100644 --- a/gcc-4_8-branch/libgo/config.h.in +++ b/gcc-4_8-branch/libgo/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the `dl_iterate_phdr' function. */ #undef HAVE_DL_ITERATE_PHDR +/* Define to 1 if you have the `dup3' function. */ +#undef HAVE_DUP3 + /* Define to 1 if you have the `epoll_create1' function. */ #undef HAVE_EPOLL_CREATE1 @@ -66,6 +69,9 @@ /* Define if _Unwind_GetIPInfo is available. */ #undef HAVE_GETIPINFO +/* Define to 1 if you have the `getxattr' function. */ +#undef HAVE_GETXATTR + /* Define to 1 if you have the `inotify_add_watch' function. */ #undef HAVE_INOTIFY_ADD_WATCH @@ -111,6 +117,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_RTNETLINK_H +/* Define to 1 if you have the `listxattr' function. */ +#undef HAVE_LISTXATTR + /* Define to 1 if the system has the type `loff_t'. */ #undef HAVE_LOFF_T @@ -171,6 +180,9 @@ /* Define to 1 if you have the `pipe2' function. */ #undef HAVE_PIPE2 +/* Define to 1 if you have the `removexattr' function. */ +#undef HAVE_REMOVEXATTR + /* Define to 1 if you have the `renameat' function. */ #undef HAVE_RENAMEAT @@ -180,6 +192,9 @@ /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV +/* Define to 1 if you have the `setxattr' function. */ +#undef HAVE_SETXATTR + /* Define to 1 if you have the `sinl' function. */ #undef HAVE_SINL diff --git a/gcc-4_8-branch/libgo/configure b/gcc-4_8-branch/libgo/configure index e54a2cd1b0c..c416dacc516 100755 --- a/gcc-4_8-branch/libgo/configure +++ b/gcc-4_8-branch/libgo/configure @@ -14700,7 +14700,7 @@ else fi -for ac_func in accept4 epoll_create1 faccessat fallocate fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_init1 inotify_rm_watch mkdirat mknodat openat pipe2 renameat sync_file_range splice tee unlinkat unshare utimensat +for ac_func in accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat openat pipe2 removexattr renameat setxattr sync_file_range splice tee unlinkat unshare utimensat do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/gcc-4_8-branch/libgo/configure.ac b/gcc-4_8-branch/libgo/configure.ac index 81c0a88b0cd..8ce846d9fbf 100644 --- a/gcc-4_8-branch/libgo/configure.ac +++ b/gcc-4_8-branch/libgo/configure.ac @@ -503,7 +503,7 @@ AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv dl_iterate_phdr) AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes) AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes) -AC_CHECK_FUNCS(accept4 epoll_create1 faccessat fallocate fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_init1 inotify_rm_watch mkdirat mknodat openat pipe2 renameat sync_file_range splice tee unlinkat unshare utimensat) +AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat openat pipe2 removexattr renameat setxattr sync_file_range splice tee unlinkat unshare utimensat) AC_TYPE_OFF_T AC_CHECK_TYPES([loff_t]) diff --git a/gcc-4_8-branch/libgo/go/syscall/libcall_linux.go b/gcc-4_8-branch/libgo/go/syscall/libcall_linux.go index 79de2f389e9..60eecd9ef89 100644 --- a/gcc-4_8-branch/libgo/go/syscall/libcall_linux.go +++ b/gcc-4_8-branch/libgo/go/syscall/libcall_linux.go @@ -190,6 +190,9 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { //sys Adjtimex(buf *Timex) (state int, err error) //adjtimex(buf *Timex) _C_int +//sysnb Dup3(oldfd int, newfd int, flags int) (err error) +//dup3(oldfd _C_int, newfd _C_int, flags _C_int) _C_int + //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //faccessat(dirfd _C_int, pathname *byte, mode _C_int, flags _C_int) _C_int @@ -268,6 +271,9 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, return origlen - len(buf), count, names } +//sys Getxattr(path string, attr string, dest []byte) (sz int, err error) +//getxattr(path *byte, attr *byte, buf *byte, count Size_t) Ssize_t + //sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) //inotify_add_watch(fd _C_int, pathname *byte, mask uint32) _C_int @@ -283,6 +289,9 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, //sys Klogctl(typ int, buf []byte) (n int, err error) //klogctl(typ _C_int, bufp *byte, len _C_int) _C_int +//sys Listxattr(path string, dest []byte) (sz int, err error) +//listxattr(path *byte, list *byte, size Size_t) Ssize_t + //sys Mkdirat(dirfd int, path string, mode uint32) (err error) //mkdirat(dirfd _C_int, path *byte, mode Mode_t) _C_int @@ -305,6 +314,9 @@ func Pipe2(p []int, flags int) (err error) { //sys PivotRoot(newroot string, putold string) (err error) //pivot_root(newroot *byte, putold *byte) _C_int +//sys Removexattr(path string, attr string) (err error) +//removexattr(path *byte, name *byte) _C_int + //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //renameat(olddirfd _C_int, oldpath *byte, newdirfd _C_int, newpath *byte) _C_int @@ -338,6 +350,9 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sysnb Setresuid(ruid int, eguid int, suid int) (err error) //setresuid(ruid Uid_t, euid Uid_t, suid Uid_t) _C_int +//sys Setxattr(path string, attr string, data []byte, flags int) (err error) +//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int + //sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error) //splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { diff --git a/gcc-4_8-branch/libgo/go/syscall/libcall_posix.go b/gcc-4_8-branch/libgo/go/syscall/libcall_posix.go index 1e7823b541c..91ff59b6cfa 100644 --- a/gcc-4_8-branch/libgo/go/syscall/libcall_posix.go +++ b/gcc-4_8-branch/libgo/go/syscall/libcall_posix.go @@ -238,6 +238,9 @@ func FDZero(set *FdSet) { //sysnb Getppid() (ppid int) //getppid() Pid_t +//sys Getpriority(which int, who int) (prio int, err error) +//getpriority(which _C_int, who _C_int) _C_int + //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //getrlimit(resource _C_int, rlim *Rlimit) _C_int @@ -307,6 +310,9 @@ func Gettimeofday(tv *Timeval) (err error) { //sysnb Setpgid(pid int, pgid int) (err error) //setpgid(pid Pid_t, pgid Pid_t) _C_int +//sys Setpriority(which int, who int, prio int) (err error) +//setpriority(which _C_int, who _C_int, prio _C_int) _C_int + //sysnb Setreuid(ruid int, euid int) (err error) //setreuid(ruid Uid_t, euid Uid_t) _C_int diff --git a/gcc-4_8-branch/libgo/mksysinfo.sh b/gcc-4_8-branch/libgo/mksysinfo.sh index 11bcb257a94..71c328627a6 100755 --- a/gcc-4_8-branch/libgo/mksysinfo.sh +++ b/gcc-4_8-branch/libgo/mksysinfo.sh @@ -1035,6 +1035,10 @@ grep '^type _utimbuf ' gen-sysinfo.go | \ grep '^const _LOCK_' gen-sysinfo.go | sed -e 's/^\(const \)_\(LOCK_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# The PRIO constants. +grep '^const _PRIO_' gen-sysinfo.go | \ + sed -e 's/^\(const \)_\(PRIO_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} + # The GNU/Linux LINUX_REBOOT flags. grep '^const _LINUX_REBOOT_' gen-sysinfo.go | sed -e 's/^\(const \)_\(LINUX_REBOOT_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} diff --git a/gcc-4_8-branch/libgo/runtime/go-cdiv.c b/gcc-4_8-branch/libgo/runtime/go-cdiv.c new file mode 100644 index 00000000000..0a81e458c84 --- /dev/null +++ b/gcc-4_8-branch/libgo/runtime/go-cdiv.c @@ -0,0 +1,46 @@ +/* go-cdiv.c -- complex division routines + + Copyright 2013 The Go Authors. All rights reserved. + Use of this source code is governed by a BSD-style + license that can be found in the LICENSE file. */ + +/* Calls to these functions are generated by the Go frontend for + division of complex64 or complex128. We use these because Go's + complex division expects slightly different results from the GCC + default. When dividing NaN+1.0i / 0+0i, Go expects NaN+NaNi but + GCC generates NaN+Infi. NaN+Infi seems wrong seems the rules of + C99 Annex G specify that if either side of a complex number is Inf, + the the whole number is Inf, but an operation involving NaN ought + to result in NaN, not Inf. */ + +__complex float +__go_complex64_div (__complex float a, __complex float b) +{ + if (__builtin_expect (b == 0+0i, 0)) + { + if (!__builtin_isinff (__real__ a) + && !__builtin_isinff (__imag__ a) + && (__builtin_isnanf (__real__ a) || __builtin_isnanf (__imag__ a))) + { + /* Pass "1" to nanf to match math/bits.go. */ + return __builtin_nanf("1") + __builtin_nanf("1")*1i; + } + } + return a / b; +} + +__complex double +__go_complex128_div (__complex double a, __complex double b) +{ + if (__builtin_expect (b == 0+0i, 0)) + { + if (!__builtin_isinf (__real__ a) + && !__builtin_isinf (__imag__ a) + && (__builtin_isnan (__real__ a) || __builtin_isnan (__imag__ a))) + { + /* Pass "1" to nan to match math/bits.go. */ + return __builtin_nan("1") + __builtin_nan("1")*1i; + } + } + return a / b; +} diff --git a/gcc-4_8-branch/libgo/runtime/go-make-slice.c b/gcc-4_8-branch/libgo/runtime/go-make-slice.c index 591ab37e0c6..f08cb012dc8 100644 --- a/gcc-4_8-branch/libgo/runtime/go-make-slice.c +++ b/gcc-4_8-branch/libgo/runtime/go-make-slice.c @@ -34,7 +34,10 @@ __go_make_slice2 (const struct __go_type_descriptor *td, uintptr_t len, std = (const struct __go_slice_type *) td; ilen = (intgo) len; - if (ilen < 0 || (uintptr_t) ilen != len) + if (ilen < 0 + || (uintptr_t) ilen != len + || (std->__element_type->__size > 0 + && len > MaxMem / std->__element_type->__size)) runtime_panicstring ("makeslice: len out of range"); icap = (intgo) cap; diff --git a/gcc-4_8-branch/libgo/runtime/go-nosys.c b/gcc-4_8-branch/libgo/runtime/go-nosys.c index 3ab5ea235f2..0a94de0523e 100644 --- a/gcc-4_8-branch/libgo/runtime/go-nosys.c +++ b/gcc-4_8-branch/libgo/runtime/go-nosys.c @@ -43,6 +43,17 @@ accept4 (int sockfd __attribute__ ((unused)), } #endif +#ifndef HAVE_DUP3 +int +dup3 (int oldfd __attribute__ ((unused)), + int newfd __attribute__ ((unused)), + int flags __attribute__ ((unused))) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef HAVE_EPOLL_CREATE1 int epoll_create1 (int flags __attribute__ ((unused))) @@ -112,6 +123,18 @@ futimesat (int dirfd __attribute__ ((unused)), } #endif +#ifndef HAVE_GETXATTR +ssize_t +getxattr (const char *path __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + void *value __attribute__ ((unused)), + size_t size __attribute__ ((unused))) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef HAVE_INOTIFY_ADD_WATCH int inotify_add_watch (int fd __attribute__ ((unused)), @@ -151,6 +174,17 @@ inotify_rm_watch (int fd __attribute__ ((unused)), } #endif +#ifndef HAVE_LISTXATTR +ssize_t +listxattr (const char *path __attribute__ ((unused)), + char *list __attribute__ ((unused)), + size_t size __attribute__ ((unused))) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef HAVE_MKDIRAT int mkdirat (int dirfd __attribute__ ((unused)), @@ -196,6 +230,16 @@ pipe2 (int pipefd[2] __attribute__ ((unused)), } #endif +#ifndef HAVE_REMOVEXATTR +int +removexattr (const char *path __attribute__ ((unused)), + const char *name __attribute__ ((unused))) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef HAVE_RENAMEAT int renameat (int olddirfd __attribute__ ((unused)), @@ -208,6 +252,19 @@ renameat (int olddirfd __attribute__ ((unused)), } #endif +#ifndef HAVE_SETXATTR +int +setxattr (const char *path __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + const void *value __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + int flags __attribute__ ((unused))) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef HAVE_SPLICE int splice (int fd __attribute__ ((unused)), diff --git a/gcc-4_8-branch/libgo/runtime/go-signal.c b/gcc-4_8-branch/libgo/runtime/go-signal.c index 9771b71cfcf..23a94db4157 100644 --- a/gcc-4_8-branch/libgo/runtime/go-signal.c +++ b/gcc-4_8-branch/libgo/runtime/go-signal.c @@ -399,6 +399,9 @@ sig_tramp_info (int sig, Siginfo *info, void *context) { G *gp; M *mp; +#ifdef USING_SPLIT_STACK + void *stack_context[10]; +#endif /* We are now running on the stack registered via sigaltstack. (Actually there is a small span of time between runtime_siginit @@ -409,7 +412,7 @@ sig_tramp_info (int sig, Siginfo *info, void *context) if (gp != NULL) { #ifdef USING_SPLIT_STACK - __splitstack_getcontext (&gp->stack_context[0]); + __splitstack_getcontext (&stack_context[0]); #endif } @@ -432,7 +435,7 @@ sig_tramp_info (int sig, Siginfo *info, void *context) if (gp != NULL) { #ifdef USING_SPLIT_STACK - __splitstack_setcontext (&gp->stack_context[0]); + __splitstack_setcontext (&stack_context[0]); #endif } } diff --git a/gcc-4_8-branch/libgomp/ChangeLog b/gcc-4_8-branch/libgomp/ChangeLog index 34ea133cf8d..7a377b7d4c2 100644 --- a/gcc-4_8-branch/libgomp/ChangeLog +++ b/gcc-4_8-branch/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-09 Jakub Jelinek * parallel.c (GOMP_parallel_end): Remember team->nthreads and call diff --git a/gcc-4_8-branch/libiberty/ChangeLog b/gcc-4_8-branch/libiberty/ChangeLog index 34813eef9f7..df4c305d7e5 100644 --- a/gcc-4_8-branch/libiberty/ChangeLog +++ b/gcc-4_8-branch/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libitm/ChangeLog b/gcc-4_8-branch/libitm/ChangeLog index 287bf737047..b71c0f8f729 100644 --- a/gcc-4_8-branch/libitm/ChangeLog +++ b/gcc-4_8-branch/libitm/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-08-14 Andreas Krebbel Revert: diff --git a/gcc-4_8-branch/libjava/ChangeLog b/gcc-4_8-branch/libjava/ChangeLog index a7f4a225b38..2701366be1e 100644 --- a/gcc-4_8-branch/libjava/ChangeLog +++ b/gcc-4_8-branch/libjava/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-06-19 Matthias Klose * pkg.m4 (PKG_CHECK_MODULES): Use AC_PATH_TOOL to check for pkg-config. diff --git a/gcc-4_8-branch/libjava/classpath/ChangeLog b/gcc-4_8-branch/libjava/classpath/ChangeLog index 6831ade4e43..cb9966d95b6 100644 --- a/gcc-4_8-branch/libjava/classpath/ChangeLog +++ b/gcc-4_8-branch/libjava/classpath/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libjava/libltdl/ChangeLog b/gcc-4_8-branch/libjava/libltdl/ChangeLog index d8df6fb18db..7ff264616cb 100644 --- a/gcc-4_8-branch/libjava/libltdl/ChangeLog +++ b/gcc-4_8-branch/libjava/libltdl/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libmudflap/ChangeLog b/gcc-4_8-branch/libmudflap/ChangeLog index 6336ffd14da..64800db427a 100644 --- a/gcc-4_8-branch/libmudflap/ChangeLog +++ b/gcc-4_8-branch/libmudflap/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libobjc/ChangeLog b/gcc-4_8-branch/libobjc/ChangeLog index a775e42842a..feec5c9b8da 100644 --- a/gcc-4_8-branch/libobjc/ChangeLog +++ b/gcc-4_8-branch/libobjc/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-07-04 Kai Tietz * exception.c: Add check for SjLj to SEH blocks. diff --git a/gcc-4_8-branch/libquadmath/ChangeLog b/gcc-4_8-branch/libquadmath/ChangeLog index cdca513b11f..449fea92699 100644 --- a/gcc-4_8-branch/libquadmath/ChangeLog +++ b/gcc-4_8-branch/libquadmath/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libsanitizer/ChangeLog b/gcc-4_8-branch/libsanitizer/ChangeLog index 7681a5a0834..11d22c0208b 100644 --- a/gcc-4_8-branch/libsanitizer/ChangeLog +++ b/gcc-4_8-branch/libsanitizer/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libssp/ChangeLog b/gcc-4_8-branch/libssp/ChangeLog index 385833ebf77..10dcb78a645 100644 --- a/gcc-4_8-branch/libssp/ChangeLog +++ b/gcc-4_8-branch/libssp/ChangeLog @@ -1,3 +1,7 @@ +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-05-31 Release Manager * GCC 4.8.1 released. diff --git a/gcc-4_8-branch/libstdc++-v3/ChangeLog b/gcc-4_8-branch/libstdc++-v3/ChangeLog index c9ffe6ee858..f2e38052a41 100644 --- a/gcc-4_8-branch/libstdc++-v3/ChangeLog +++ b/gcc-4_8-branch/libstdc++-v3/ChangeLog @@ -1,3 +1,60 @@ +2013-11-05 Jonathan Wakely + + * doc/xml/manual/status_cxx2011.xml: Document aligned_union as + missing. + + * doc/xml/manual/spine.xml: Update copyright years. + * doc/html/*: Regenerate. + +2013-11-01 Paolo Carlini + + PR libstdc++/58952 + * include/c_global/cstdio: Undef getchar. + +2013-10-31 Jonathan Wakely + + * testsuite/20_util/shared_ptr/cons/58839.cc: Do not use + default_delete. + +2013-10-30 Chris Studholme + + PR libstdc++/58912 + * include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove + unnecessary initialization of storage buffer. + +2013-10-29 Jonathan Wakely + + PR libstdc++/58839 + * include/bits/shared_ptr_base.h + (__shared_ptr::__shared_ptr(unique_ptr&&)): Do not dereference + pointer. + * testsuite/20_util/shared_ptr/cons/58839.cc: New. + +2013-10-20 Chris Jefferson + Paolo Carlini + + PR libstdc++/58800 + * include/bits/stl_algo.h (__unguarded_partition_pivot): Change + __last - 2 to __last - 1. + * testsuite/25_algorithms/nth_element/58800.cc: New + +2013-10-16 François Dumont + + PR libstdc++/58191 + * include/debug/macros.h (__glibcxx_check_partitioned_lower): Add + __gnu_debug::__base calls on iterators passed to internal debug + check. + (__glibcxx_check_partitioned_lower_pred): Likewise. + (__glibcxx_check_partitioned_upper): Likewise. + (__glibcxx_check_partitioned_upper_pred): Likewise. + * include/debug/functions.h (__check_partitioned_lower): + Remove code to detect safe iterators. + (__check_partitioned_upper): Likewise. + +2013-10-16 Release Manager + + * GCC 4.8.2 released. + 2013-10-09 Jonathan Wakely * testsuite/20_util/shared_ptr/cons/58659.cc: Use VERIFY instead of diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/api.html b/gcc-4_8-branch/libstdc++-v3/doc/html/api.html index cc338d23eeb..fb51abc7f12 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/api.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/api.html @@ -1,12 +1,12 @@ -The GNU C++ Library API Reference

The GNU C++ Library API Reference

The GNU C++ Library API Reference


diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/bk02.html b/gcc-4_8-branch/libstdc++-v3/doc/html/bk02.html index df887b8b3b7..4529fb8a230 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/bk02.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/bk02.html @@ -1,2 +1,2 @@ -

\ No newline at end of file + \ No newline at end of file diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/bk03.html b/gcc-4_8-branch/libstdc++-v3/doc/html/bk03.html index 316d2cd7bb2..072e7faa59f 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/bk03.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/bk03.html @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/faq.html b/gcc-4_8-branch/libstdc++-v3/doc/html/faq.html index b90c93f9e5b..95aad668c2f 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/faq.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/faq.html @@ -1,9 +1,9 @@ -Frequently Asked Questions

Frequently Asked Questions

Frequently Asked Questions


1.1. +


1.1. What is libstdc++?
1.2. Why should I use libstdc++? diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/index.html b/gcc-4_8-branch/libstdc++-v3/doc/html/index.html index 7481dc9d04d..787112d9299 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/index.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/index.html @@ -1,5 +1,5 @@ -The GNU C++ Library

The GNU C++ Library

Short Contents

+The GNU C++ Library

The GNU C++ Library

Short Contents

Copyright (C) 2008-2013 FSF @@ -20,7 +20,7 @@

  • API and Source Documentation

  • -



    Table of Contents

    The GNU C++ Library Manual
    I. Introduction
    1. Status
    Implementation Status
    C++ 1998/2003
    Implementation Status
    Implementation Specific Behavior
    C++ 2011
    Implementation Specific Behavior
    C++ TR1
    Implementation Specific Behavior
    C++ TR 24733
    License
    The Code: GPL
    The Documentation: GPL, FDL
    Bugs
    Implementation Bugs
    Standard Bugs
    2. Setup
    Prerequisites
    Configure
    Make
    3. Using
    Command Options
    Headers
    Header Files
    Mixing Headers
    The C Headers and namespace std
    Precompiled Headers
    Macros
    Namespaces
    Available Namespaces
    namespace std
    Using Namespace Composition
    Linking
    Almost Nothing
    Finding Dynamic or Shared Libraries
    Concurrency
    Prerequisites
    Thread Safety
    Atomics
    IO
    Structure
    Defaults
    Future
    Alternatives
    Containers
    Exceptions
    Exception Safety
    Exception Neutrality
    Doing without
    Compatibility
    With C
    With POSIX thread cancellation
    Debugging Support
    Using g++
    Debug Versions of Library Binary Files
    Memory Leak Hunting
    Data Race Hunting
    Using gdb
    Tracking uncaught exceptions
    Debug Mode
    Compile Time Checking
    Profile-based Performance Analysis
    II. @@ -34,13 +34,13 @@
    Exceptions
    API Reference
    Adding Data to exception
    Concept Checking
    6. Utilities -
    Functors
    Pairs
    Memory
    Allocators
    Requirements
    Design Issues
    Implementation
    Interface Design
    Selecting Default Allocation Policy
    Disabling Memory Caching
    Using a Specific Allocator
    Custom Allocators
    Extension Allocators
    auto_ptr
    Limitations
    Use in Containers
    shared_ptr
    Requirements
    Design Issues
    Implementation
    Class Hierarchy
    Thread Safety
    Selecting Lock Policy
    Related functions and classes
    Use
    Examples
    Unresolved Issues
    Acknowledgments
    Traits
    7. +
    Functors
    Pairs
    Memory
    Allocators
    Requirements
    Design Issues
    Implementation
    Interface Design
    Selecting Default Allocation Policy
    Disabling Memory Caching
    Using a Specific Allocator
    Custom Allocators
    Extension Allocators
    auto_ptr
    Limitations
    Use in Containers
    shared_ptr
    Requirements
    Design Issues
    Implementation
    Class Hierarchy
    Thread Safety
    Selecting Lock Policy
    Related functions and classes
    Use
    Examples
    Unresolved Issues
    Acknowledgments
    Traits
    7. Strings
    String Classes
    Simple Transformations
    Case Sensitivity
    Arbitrary Character Types
    Tokenizing
    Shrink to Fit
    CString (MFC)
    8. Localization -
    Locales
    locale
    Requirements
    Design
    Implementation
    Interacting with "C" locales
    Future
    Facets
    ctype
    Implementation
    Specializations
    Future
    codecvt
    Requirements
    Design
    wchar_t Size
    Support for Unicode
    Other Issues
    Implementation
    Use
    Future
    messages
    Requirements
    Design
    Implementation
    Models
    The GNU Model
    Use
    Future
    9. +
    Locales
    locale
    Requirements
    Design
    Implementation
    Interacting with "C" locales
    Future
    Facets
    ctype
    Implementation
    Specializations
    Future
    codecvt
    Requirements
    Design
    wchar_t Size
    Support for Unicode
    Other Issues
    Implementation
    Use
    Future
    messages
    Requirements
    Design
    Implementation
    Models
    The GNU Model
    Use
    Future
    9. Containers
    Sequences
    list
    list::size() is O(n)
    vector
    Space Overhead Management
    Associative
    Insertion Hints
    bitset
    Size Variable
    Type String
    Unordered Associative
    Hash Code
    Hash Code Caching Policy
    Interacting with C
    Containers vs. Arrays
    10. diff --git a/gcc-4_8-branch/libstdc++-v3/doc/html/manual/abi.html b/gcc-4_8-branch/libstdc++-v3/doc/html/manual/abi.html index c5cf1edbb4b..337cf81fe0f 100644 --- a/gcc-4_8-branch/libstdc++-v3/doc/html/manual/abi.html +++ b/gcc-4_8-branch/libstdc++-v3/doc/html/manual/abi.html @@ -1,5 +1,5 @@ -ABI Policy and Guidelines