aboutsummaryrefslogtreecommitdiff
path: root/libvtv
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2015-08-01 18:17:39 -0700
committerCaroline Tice <ctice@gcc.gnu.org>2015-08-01 18:17:39 -0700
commitb0cca5ecbb2841811a6c6aeaa40a3040289aeba3 (patch)
tree542c49f18581e9f2ecf6316e769cb4cee782b47c /libvtv
parent68e3e6a259b235add2d0c0f7dc3f92e7a47c5e90 (diff)
downloadgcc-b0cca5ecbb2841811a6c6aeaa40a3040289aeba3.zip
gcc-b0cca5ecbb2841811a6c6aeaa40a3040289aeba3.tar.gz
gcc-b0cca5ecbb2841811a6c6aeaa40a3040289aeba3.tar.bz2
re PR bootstrap/66521 (xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc)
Fix PR 66521 libvtv/ChangeLog 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * Makefile.am: Update to match latest tree. * Makefile.in: Regenerate. * testsuite/lib/libvtv: Brought up to date. * vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed function (old bug!). * vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update initializations to work correctly with VTV_DEBUG defined. gcc/ChangeLog: 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * vtable-verify.c (vtbl_mangled_name_types, vtbl_mangled_name_ids): New global variables. (vtbl_find_mangled_name): New function. (vtbl_register_mangled_name): New function. (vtbl_map_get_node): If DECL_ASSEMBLER_NAME is "<anon>", look up mangled name in mangled name vectors. (find_or_create_vtbl_map_node): Ditto. (var_is_used_for_virtual_call_p): Add recursion_depth parameter; update recursion_depth on function entry; pass it to every recursive call; automatically exit if depth > 25 (give up looking at that point). (verify_bb_vtables): Initialize recursion_depth and pass it to var_is_used_for_virtual_call_p. * vtable-verify.h (vtbl_mangbled_name_types, vtbl_mangled_name_ids): New global variable decls. (vtbl_register_mangled_name): New extern function decl. gcc/cp/ChangeLog: 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * mangle.c : Add vtable-verify.h to include files. (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME is "<anon>" get the real mangled name for the class instead, and also store the real mangled name in a vector for use later. From-SVN: r226471
Diffstat (limited to 'libvtv')
-rw-r--r--libvtv/ChangeLog11
-rw-r--r--libvtv/testsuite/Makefile.am16
-rw-r--r--libvtv/testsuite/Makefile.in14
-rw-r--r--libvtv/testsuite/lib/libvtv.exp37
-rw-r--r--libvtv/vtv_malloc.cc2
-rw-r--r--libvtv/vtv_rts.cc7
6 files changed, 58 insertions, 29 deletions
diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog
index d7fd975..612c660 100644
--- a/libvtv/ChangeLog
+++ b/libvtv/ChangeLog
@@ -1,3 +1,14 @@
+2015-08-01 Caroline Tice <cmtice@google.com>
+
+ PR 66521
+ * Makefile.am: Update to match latest tree.
+ * Makefile.in: Regenerate.
+ * testsuite/lib/libvtv: Brought up to date.
+ * vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed
+ function (old bug!).
+ * vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update
+ initializations to work correctly with VTV_DEBUG defined.
+
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* Makefile.in: Regenerated with automake-1.11.6.
diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am
index a2c1e9f..561b7e2 100644
--- a/libvtv/testsuite/Makefile.am
+++ b/libvtv/testsuite/Makefile.am
@@ -1,11 +1,13 @@
-## Process this with automake to create Makefile.in
+## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = foreign dejagnu
-EXPECT = `if [ -f ../../expect/expect ] ; then \
- echo ../../expect/expect ; \
- else echo expect ; fi`
+# May be used by various substitution variables.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
-RUNTEST = `if [ -f ${srcdir}/../../dejagnu/runtest ] ; then \
- echo ${srcdir}/../../dejagnu/runtest ; \
- else echo runtest ; fi`
+EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
+ echo $(top_builddir)/../expect/expect; else echo expect; fi)
+
+_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
+ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
+RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
index 49f8f71..e19e13e 100644
--- a/libvtv/testsuite/Makefile.in
+++ b/libvtv/testsuite/Makefile.in
@@ -217,14 +217,16 @@ top_srcdir = @top_srcdir@
toplevel_builddir = @toplevel_builddir@
toplevel_srcdir = @toplevel_srcdir@
AUTOMAKE_OPTIONS = foreign dejagnu
-EXPECT = `if [ -f ../../expect/expect ] ; then \
- echo ../../expect/expect ; \
- else echo expect ; fi`
-RUNTEST = `if [ -f ${srcdir}/../../dejagnu/runtest ] ; then \
- echo ${srcdir}/../../dejagnu/runtest ; \
- else echo runtest ; fi`
+# May be used by various substitution variables.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
+ echo $(top_builddir)/../expect/expect; else echo expect; fi)
+_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
+ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
+
+RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
all: all-am
.SUFFIXES:
diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp
index c473b0a..aefcbd2 100644
--- a/libvtv/testsuite/lib/libvtv.exp
+++ b/libvtv/testsuite/lib/libvtv.exp
@@ -23,24 +23,28 @@ proc load_gcc_lib { filename } {
}
load_lib dg.exp
-load_gcc_lib file-format.exp
+
+# Required to use gcc-dg.exp - however, the latter should NOT be
+# loaded until ${tool}_target_compile is defined since it uses that
+# to determine default LTO options.
+
+load_gcc_lib prune.exp
+load_gcc_lib target-libpath.exp
+load_gcc_lib wrapper.exp
load_gcc_lib target-supports.exp
-load_gcc_lib target-supports-dg.exp
load_gcc_lib target-utils.exp
+load_gcc_lib gcc-defs.exp
+load_gcc_lib timeout.exp
+load_gcc_lib file-format.exp
+load_gcc_lib target-supports-dg.exp
load_gcc_lib scanasm.exp
load_gcc_lib scandump.exp
load_gcc_lib scanrtl.exp
load_gcc_lib scantree.exp
load_gcc_lib scanipa.exp
-load_gcc_lib prune.exp
-load_gcc_lib target-libpath.exp
-load_gcc_lib wrapper.exp
-load_gcc_lib gcc-defs.exp
-load_gcc_lib torture-options.exp
-load_gcc_lib timeout.exp
load_gcc_lib timeout-dg.exp
+load_gcc_lib torture-options.exp
load_gcc_lib fortran-modules.exp
-load_gcc_lib gcc-dg.exp
set dg-do-what-default run
@@ -143,10 +147,20 @@ proc libvtv_init { args } {
}
lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.."
+ # We use atomic operations in the testcases to validate results.
+ if { ([istarget i?86-*-*] || [istarget x86_64-*-*])
+ && [check_effective_target_ia32] } {
+ lappend ALWAYS_CFLAGS "additional_flags=-march=i486"
+ }
+
if [istarget *-*-darwin*] {
lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc"
}
+ if [istarget sparc*-*-*] {
+ lappend ALWAYS_CFLAGS "additional_flags=-mcpu=v9"
+ }
+
if [info exists TOOL_OPTIONS] {
lappend ALWAYS_CFLAGS "additional_flags=$TOOL_OPTIONS"
}
@@ -155,9 +169,8 @@ proc libvtv_init { args } {
# error-message parsing machinery.
lappend ALWAYS_CFLAGS "additional_flags=-fmessage-length=0"
- # Turn on vtable verification
- lappend ALWAYS_CFLAGS "-fvtable-verify=std"
- # lappend ALWAYS_CFLAGS "ldflags=-lvtv"
+ # Turn on vtable verification.
+ lappend ALWAYS_CFLAGS "additional_flags=-fvtable-verify=std"
}
#
diff --git a/libvtv/vtv_malloc.cc b/libvtv/vtv_malloc.cc
index 4b675f4..5249248 100644
--- a/libvtv/vtv_malloc.cc
+++ b/libvtv/vtv_malloc.cc
@@ -145,7 +145,7 @@ change_protections_on_data_chunks (int protection_flag)
}
#ifdef VTV_DEBUG
- VTV_malloc_dump_stats ();
+ __vtv_malloc_dump_stats ();
#endif
}
diff --git a/libvtv/vtv_rts.cc b/libvtv/vtv_rts.cc
index f5344a0..7bde2f4 100644
--- a/libvtv/vtv_rts.cc
+++ b/libvtv/vtv_rts.cc
@@ -201,14 +201,15 @@ unsigned long long verify_vtable_cycles = 0;
debugging/tracing will not be ON on production environments */
static const bool debug_hash = HASHTABLE_STATS;
-static const int debug_functions = 0;
-static const int debug_init = 0;
-static const int debug_verify_vtable = 0;
#ifdef VTV_DEBUG
static const int debug_functions = 1;
static const int debug_init = 1;
static const int debug_verify_vtable = 1;
+#else
+static const int debug_functions = 0;
+static const int debug_init = 0;
+static const int debug_verify_vtable = 0;
#endif
/* Global file descriptor variables for logging, tracing and debugging. */