From: Jakub Jelinek Date: Tue, 12 Jul 2011 09:13:06 +0000 (+0200) Subject: re PR tree-optimization/49712 (internal compiler error: in gen_lsm_tmp_name, at tree... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5fed62d7296fd18f8cd55d95cafef1de7f62816;p=gcc.git re PR tree-optimization/49712 (internal compiler error: in gen_lsm_tmp_name, at tree-ssa-loop-im.c:2048) PR tree-optimization/49712 * tree-ssa-loop-im.c (gen_lsm_tmp_name): Handle TARGET_MEM_REF. * gcc.c-torture/execute/pr49712.c: New test. From-SVN: r176195 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7fb19da7596..2599e731729 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Jakub Jelinek + + PR tree-optimization/49712 + * tree-ssa-loop-im.c (gen_lsm_tmp_name): Handle TARGET_MEM_REF. + 2011-07-11 Bernd Schmidt * genautomata.c (add_arc): Return void. All callers changed. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7d50bd12f6a..88f61ccce56 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Jakub Jelinek + + PR tree-optimization/49712 + * gcc.c-torture/execute/pr49712.c: New test. + 2011-07-11 Jason Merrill PR c++/44609 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr49712.c b/gcc/testsuite/gcc.c-torture/execute/pr49712.c new file mode 100644 index 00000000000..b85887bfcf0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr49712.c @@ -0,0 +1,28 @@ +/* PR tree-optimization/49712 */ + +int a[2], b, c, d, e; + +void +foo (int x, int y) +{ +} + +int +bar (void) +{ + int i; + for (; d <= 0; d = 1) + for (i = 0; i < 4; i++) + for (e = 0; e; e = 1) + ; + return 0; +} + +int +main () +{ + for (b = 0; b < 2; b++) + while (c) + foo (a[b] = 0, bar ()); + return 0; +} diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 778edd49ff0..3a5608e484e 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -1982,6 +1982,7 @@ gen_lsm_tmp_name (tree ref) switch (TREE_CODE (ref)) { case MEM_REF: + case TARGET_MEM_REF: gen_lsm_tmp_name (TREE_OPERAND (ref, 0)); lsm_tmp_name_add ("_"); break;