diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-05 18:34:43 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-05 18:34:43 +0000 |
commit | 14a3093e9943937cbc63dfbf4d51ca60f8325b29 (patch) | |
tree | f7ff5f5bcf5270f0634b04ac3d90cdcb69b10d38 /gcc/testsuite/gcc.target/avr | |
parent | 4b16a1eaa0d7841fd7efcfcfcee2934a6d68819c (diff) | |
download | gcc-14a3093e9943937cbc63dfbf4d51ca60f8325b29.tar.gz |
PR target/52472
* cfgexpand.c (expand_debug_expr): Use address space of nested
TREE_TYPE for ADDR_EXPR and MEM_REF.
PR target/52472
* gcc.target/avr/pr52472.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211288 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/avr')
-rw-r--r-- | gcc/testsuite/gcc.target/avr/pr52472.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/avr/pr52472.c b/gcc/testsuite/gcc.target/avr/pr52472.c new file mode 100644 index 00000000000..701cfb42a25 --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/pr52472.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -g -Wno-pointer-to-int-cast" } */ + +/* This testcase exposes PR52472. expand_debug_expr mistakenly + considers the address space of data to be generic, and + asserts that PSImode pointers aren't valid in the generic + address space. */ + +extern const __memx unsigned data[][10]; + +unsigned long ice (void) +{ + unsigned long addr32; + + return addr32 = ((unsigned long) data); +} |