From 74c101d5fd4ebf45d9127efd82e1325882e48a12 Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 18 Sep 2014 15:57:06 +0000 Subject: [PATCH] re PR target/61360 (ICE: in lra_update_insn_recog_data, at lra.c:1363 with -mtune=bdver4) 2014-09-18 Vladimir Makarov PR target/61360 * lra.c (lra): Call recog_init. 2014-09-18 Vladimir Makarov PR target/61360 * gcc.target/i386/pr61360.c: New. From-SVN: r215358 --- gcc/ChangeLog | 5 +++++ gcc/lra.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr61360.c | 12 ++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr61360.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8dc34e04b7..3c55ce46693 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-18 Vladimir Makarov + + PR target/61360 + * lra.c (lra): Call recog_init. + 2014-09-18 Jakub Jelinek PR c++/62017 diff --git a/gcc/lra.c b/gcc/lra.c index be8b489fbe7..acec8af9368 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -2135,6 +2135,11 @@ lra (FILE *f) lra_in_progress = 1; + /* The enable attributes can change their values as LRA starts + although it is a bad practice. To prevent reuse of the outdated + values, clear them. */ + recog_init (); + lra_live_range_iter = lra_coalesce_iter = 0; lra_constraint_iter = lra_constraint_iter_after_spill = 0; lra_inheritance_iter = lra_undo_inheritance_iter = 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d42700761c..de00b32c291 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-09-18 Vladimir Makarov + + PR target/61360 + * gcc.target/i386/pr61360.c: New. + 2014-09-18 Jakub Jelinek PR c++/62017 diff --git a/gcc/testsuite/gcc.target/i386/pr61360.c b/gcc/testsuite/gcc.target/i386/pr61360.c new file mode 100644 index 00000000000..cbd3a6f6b53 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr61360.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-march=amdfam10 -O2" } */ +int a, b, c, e, f, g, h; +long *d; +__attribute__((cold)) void fn1() { + int i = g | 1; + for (; g; h++) { + for (; a; e++) d[0] = c; + if (0.002 * i) break; + for (; b; f++) d[h] = 0; + } +} -- 2.30.2