diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-03 21:59:50 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-03 21:59:50 +0100 |
commit | e3bd17639b20e009238b15b2354bb0e87e29703e (patch) | |
tree | a58435136e940314c87eea77cd3f32c0de08343a | |
parent | e3a174d0d1eef07442fca5867cfcdd05f3b845f8 (diff) | |
download | gcc-e3bd17639b20e009238b15b2354bb0e87e29703e.zip gcc-e3bd17639b20e009238b15b2354bb0e87e29703e.tar.gz gcc-e3bd17639b20e009238b15b2354bb0e87e29703e.tar.bz2 |
re PR debug/83621 (ICE: in simplify_subreg, at simplify-rtx.c:6293 with -O -g)
PR debug/83621
* cfgexpand.c (expand_debug_expr): Return NULL if mode is
BLKmode for ternary, binary or unary expressions.
* gcc.dg/pr83621.c: New test.
From-SVN: r256190
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr83621.c | 12 |
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62856ce..8df8f23 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2018-01-03 Jakub Jelinek <jakub@redhat.com> + PR debug/83621 + * cfgexpand.c (expand_debug_expr): Return NULL if mode is + BLKmode for ternary, binary or unary expressions. + PR debug/83645 * var-tracking.c (delete_vta_debug_insn): New inline function. (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index a7f3894..257ddfc 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4208,6 +4208,8 @@ expand_debug_expr (tree exp) binary: case tcc_binary: + if (mode == BLKmode) + return NULL_RTX; op1 = expand_debug_expr (TREE_OPERAND (exp, 1)); if (!op1) return NULL_RTX; @@ -4232,6 +4234,8 @@ expand_debug_expr (tree exp) unary: case tcc_unary: + if (mode == BLKmode) + return NULL_RTX; inner_mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); op0 = expand_debug_expr (TREE_OPERAND (exp, 0)); if (!op0) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e4d16a5..2c66a0d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-01-03 Jakub Jelinek <jakub@redhat.com> + PR debug/83621 + * gcc.dg/pr83621.c: New test. + PR debug/83645 * gcc.dg/pr83645.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr83621.c b/gcc/testsuite/gcc.dg/pr83621.c new file mode 100644 index 0000000..a27a0a8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83621.c @@ -0,0 +1,12 @@ +/* PR debug/83621 */ +/* { dg-do compile } */ +/* { dg-options "-O -g" } */ + +typedef int __attribute__ ((__vector_size__ (64))) V; +V v; + +void +foo () +{ + V u = v >> 1; +} |