diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-02 13:55:41 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-02 13:55:41 +0000 |
commit | a56535286def0e292062f0e4561beafdbee1504f (patch) | |
tree | 95b320c9be579d0497655d70349fd739c7e30186 /gcc/testsuite/gcc.dg/debug | |
parent | f1658ae09d3e039f986ab12c3a43d1f82ab80ef8 (diff) | |
download | gcc-a56535286def0e292062f0e4561beafdbee1504f.tar.gz |
PR debug/41893
* cfgexpand.c (expand_debug_expr): Don't attempt to create DECL_RTL
for a VOIDmode variable.
* gcc.dg/debug/pr41893-1.c: New test.
* gcc.dg/debug/pr41893-2.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153806 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug')
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/pr41893-1.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/pr41893-2.c | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/pr41893-1.c b/gcc/testsuite/gcc.dg/debug/pr41893-1.c new file mode 100644 index 00000000000..54a31fb6f2f --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/pr41893-1.c @@ -0,0 +1,13 @@ +/* PR debug/41893 */ +/* { dg-do compile } */ +/* { dg-options "-combine -fwhole-program -O" } */ +/* { dg-additional-sources "pr41893-2.c" } */ + +struct S { int v; }; +struct S s; + +void __attribute__((externally_visible)) +func1 (void) +{ + struct S *p = &s; +} diff --git a/gcc/testsuite/gcc.dg/debug/pr41893-2.c b/gcc/testsuite/gcc.dg/debug/pr41893-2.c new file mode 100644 index 00000000000..f967875f198 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/pr41893-2.c @@ -0,0 +1,10 @@ +/* PR debug/41893 */ +/* { dg-do compile } */ + +extern struct S s; + +void +func2 (void) +{ + &s; +} |