From 2f7c1e7a2979038052782517e65be455d2e27aaf Mon Sep 17 00:00:00 2001 From: pinskia Date: Tue, 12 Jul 2011 18:46:10 +0000 Subject: [PATCH] 2011-07-12 Andrew Pinski PR rtl-opt/49474 * cprop.c (find_implicit_sets): Correct the condition. 2011-07-12 Andrew Pinski PR rtl-opt/49474 * gcc.c-torture/compile/pr49474.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176213 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/cprop.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr49474.c | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr49474.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 462ee7d281d..f3abf4d0553 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Andrew Pinski + + PR rtl-opt/49474 + * cprop.c (find_implicit_sets): Correct the condition. + 2011-07-12 Richard Henderson PR target/49713 diff --git a/gcc/cprop.c b/gcc/cprop.c index 83193b9d6b4..584ffd202ba 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -1332,7 +1332,7 @@ find_implicit_sets (void) FOR_EACH_BB (bb) { /* Check for more than one successor. */ - if (! EDGE_COUNT (bb->succs) > 1) + if (EDGE_COUNT (bb->succs) <= 1) continue; cond = fis_get_condition (BB_END (bb)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 88f61ccce56..5d1cab63c7c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Andrew Pinski + + PR rtl-opt/49474 + * gcc.c-torture/compile/pr49474.c: New testcase. + 2011-07-12 Jakub Jelinek PR tree-optimization/49712 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49474.c b/gcc/testsuite/gcc.c-torture/compile/pr49474.c new file mode 100644 index 00000000000..0368ccb02fa --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr49474.c @@ -0,0 +1,16 @@ +typedef struct gfc_formal_arglist +{ + int next; +} +gfc_actual_arglist; +update_arglist_pass (gfc_actual_arglist* lst, int po, unsigned argpos, + const char *name) +{ + ((void)(__builtin_expect(!(argpos > 0), 0) ? __builtin_unreachable(), 0 : 0)); + if (argpos == 1) + return 0; + if (lst) + lst->next = update_arglist_pass (lst->next, po, argpos - 1, name); + else + lst = update_arglist_pass (((void *)0), po, argpos - 1, name); +} -- 2.11.4.GIT