aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2015-03-02 10:41:09 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2015-03-02 10:41:09 +0000
commit321a5ceb8175dac47c70164a0d539f5c30443c04 (patch)
tree90da3fc9b505fc9769972fb7a167562094f37702 /gcc
parent3307944165badd8271df1598b574b4dd7a733f37 (diff)
downloadgcc-321a5ceb8175dac47c70164a0d539f5c30443c04.zip
gcc-321a5ceb8175dac47c70164a0d539f5c30443c04.tar.gz
gcc-321a5ceb8175dac47c70164a0d539f5c30443c04.tar.bz2
re PR target/65183 (ICE: verify_ssa failed: virtual use of statement not up-to-date with -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx)
gcc/ PR target/65183 * tree-chkp.c (chkp_check_lower): Don't check against zero bounds for already instrumented functions. (chkp_check_upper): Likewise. (chkp_fini): Clean pass local data to avoid wrong reusage. gcc/testsuite/ PR target/65183 * gcc.target/i386/pr65183.c: New. From-SVN: r221105
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr65183.c20
-rw-r--r--gcc/tree-chkp.c10
4 files changed, 41 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 27b3a75..5850dc4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR target/65183
+ * tree-chkp.c (chkp_check_lower): Don't check against
+ zero bounds for already instrumented functions.
+ (chkp_check_upper): Likewise.
+ (chkp_fini): Clean pass local data to avoid wrong reusage.
+
2015-02-28 Martin Liska <mliska@suse.cz>
Jan Hubicka <hubicka@ucw.cz>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c18c5e7..c158416 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR target/65183
+ * gcc.target/i386/pr65183.c: New.
+
2015-02-28 Martin Liska <mliska@suse.cz>
Jan Hubicka <hubicka@ucw.cz>
diff --git a/gcc/testsuite/gcc.target/i386/pr65183.c b/gcc/testsuite/gcc.target/i386/pr65183.c
new file mode 100644
index 0000000..069a543
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr65183.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
+/* { dg-options "-O -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx" } */
+
+extern void bar(void *);
+extern void baz(void);
+
+static int lc[32];
+
+void foobar(void *c)
+{
+ bar(&c);
+ __builtin_memcpy (lc, c, lc[0]);
+}
+
+void foo ()
+{
+ baz ();
+ foobar(0);
+}
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index b0a3a15..d2df4ba 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -1268,7 +1268,8 @@ chkp_check_lower (tree addr, tree bounds,
gimple check;
tree node;
- if (bounds == chkp_get_zero_bounds ())
+ if (!chkp_function_instrumented_p (current_function_decl)
+ && bounds == chkp_get_zero_bounds ())
return;
if (dirflag == integer_zero_node
@@ -1314,7 +1315,8 @@ chkp_check_upper (tree addr, tree bounds,
gimple check;
tree node;
- if (bounds == chkp_get_zero_bounds ())
+ if (!chkp_function_instrumented_p (current_function_decl)
+ && bounds == chkp_get_zero_bounds ())
return;
if (dirflag == integer_zero_node
@@ -4306,6 +4308,10 @@ chkp_fini (void)
free_dominance_info (CDI_POST_DOMINATORS);
bitmap_obstack_release (NULL);
+
+ entry_block = NULL;
+ zero_bounds = NULL_TREE;
+ none_bounds = NULL_TREE;
}
/* Main instrumentation pass function. */