diff options
author | Martin Jambor <mjambor@suse.cz> | 2013-09-02 21:28:01 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2013-09-02 21:28:01 +0200 |
commit | 2fd0985c70240012e8b0b63a9cafe3b241dcddc9 (patch) | |
tree | 47a031382aaf04ff140d1c3ab0844d0492fca18d /gcc/testsuite/gcc.dg | |
parent | 91bd4114a73ca69e5ce3d904282b402b9f2128d3 (diff) | |
download | gcc-2fd0985c70240012e8b0b63a9cafe3b241dcddc9.zip gcc-2fd0985c70240012e8b0b63a9cafe3b241dcddc9.tar.gz gcc-2fd0985c70240012e8b0b63a9cafe3b241dcddc9.tar.bz2 |
re PR ipa/58106 (ICE: in ipa_edge_duplication_hook, at ipa-prop.c:2839)
2013-09-02 Martin Jambor <mjambor@suse.cz>
PR ipa/58106
* ipa-prop.c (ipa_edge_duplication_hook): Always put new rdesc to the
linked list. When finding the correct duplicate, also consider also
the caller in additon to its inlined_to node.
testsuite/
* gcc.dg/ipa/pr58106.c: New test.
From-SVN: r202184
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr58106.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/pr58106.c b/gcc/testsuite/gcc.dg/ipa/pr58106.c new file mode 100644 index 0000000..b83353c --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr58106.c @@ -0,0 +1,50 @@ +/* PR 58106 testcase. Verify that rdesc chain creating and lookup works with + recursive inlining and master clone creation. */ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +typedef struct rtx_def *rtx; +enum rtx_code { + LAST_AND_UNUSED_RTX_CODE}; +extern const char * const rtx_format[((int) LAST_AND_UNUSED_RTX_CODE)]; +struct rtx_def { + enum rtx_code code; +}; +typedef int (*rtx_function) (rtx *, void *); +extern int for_each_rtx (rtx *, rtx_function, void *); +int +replace_label (rtx *x, void *data) +{ + rtx l = *x; + if (l == (rtx) 0) + { + { + rtx new_c, new_l; + for_each_rtx (&new_c, replace_label, data); + } + } +} +static int +for_each_rtx_1 (rtx exp, int n, rtx_function f, void *data) +{ + int result, i, j; + const char *format = (rtx_format[(int) (((enum rtx_code) (exp)->code))]); + rtx *x; + for (; format[n] != '\0'; n++) + { + switch (format[n]) + { + case 'e': + result = (*f) (x, data); + { + result = for_each_rtx_1 (*x, i, f, data); + } + } + } +} +int +for_each_rtx (rtx *x, rtx_function f, void *data) +{ + int i; + return for_each_rtx_1 (*x, i, f, data); +} |