diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-10-19 09:39:43 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-10-19 09:39:43 +0200 |
commit | 2d3fc6aafc3730a15e3facad442695ced8b22925 (patch) | |
tree | 06314543c91eececa6bcd3808dfbc85a49ff743d /gcc/cfgexpand.c | |
parent | 69925f6ce8bf646a4a8fcf50b0deb77b207fb693 (diff) | |
download | gcc-2d3fc6aafc3730a15e3facad442695ced8b22925.zip gcc-2d3fc6aafc3730a15e3facad442695ced8b22925.tar.gz gcc-2d3fc6aafc3730a15e3facad442695ced8b22925.tar.bz2 |
cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM op0.
* cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM
op0.
* gcc.dg/debug/vta-3.c: New test.
From-SVN: r152972
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index acd70c1..8c7c881 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2593,6 +2593,9 @@ expand_debug_expr (tree exp) if (bitpos == 0 && mode == GET_MODE (op0)) return op0; + if (bitpos < 0) + return NULL; + if ((bitpos % BITS_PER_UNIT) == 0 && bitsize == GET_MODE_BITSIZE (mode1)) { |