diff options
author | Richard Guenther <rguenther@suse.de> | 2010-11-03 16:58:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-11-03 16:58:50 +0000 |
commit | 44cb6d4df48bdc70a4a74befd4b88094b7edb06c (patch) | |
tree | 756fef625111fa096ec9607e576ddffab7337f47 /gcc/testsuite/gcc.dg/pr46288.c | |
parent | b7fa98e27bb48a44ad2a29e471653a56bdbee831 (diff) | |
download | gcc-44cb6d4df48bdc70a4a74befd4b88094b7edb06c.tar.gz |
re PR tree-optimization/46288 (ICE: SIGSEGV in walk_gimple_op (gimple.c:2857) with -O -fno-tree-dce and __builtin_expect())
2010-11-03 Richard Guenther <rguenther@suse.de>
PR middle-end/46288
* predict.c (strip_predict_hints): Simply DCE builtin expect if
the result is unused.
* gcc.dg/pr46288.c: New testcase.
From-SVN: r166258
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr46288.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr46288.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr46288.c b/gcc/testsuite/gcc.dg/pr46288.c new file mode 100644 index 00000000000..24c8874fe00 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr46288.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-tree-dce" } */ + +void foo (int i) +{ + __builtin_expect (i, i); +} + |