]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/41273 (ICE in add_virtual_operand, at tree-ssa-operands.c:638)
authorRichard Guenther <rguenther@suse.de>
Sat, 5 Sep 2009 15:15:16 +0000 (15:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 5 Sep 2009 15:15:16 +0000 (15:15 +0000)
2009-09-05  Richard Guenther  <rguenther@suse.de>

PR debug/41273
* tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.

* g++.dg/torture/pr41273.C: New testcase.

From-SVN: r151454

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr41273.C [new file with mode: 0644]
gcc/tree-ssa-operands.c

index a8c927f7d3a745f49b0a5a72a9455cc66a82a8f1..9f2b7488a751015ba58d14fdcb1f88a804865a15 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-05  Richard Guenther  <rguenther@suse.de>
+
+       PR debug/41273
+       * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
+
 2009-09-05  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/41271
index cd4617183bb7fb616336204ef2bda18c9a205dde..3373d071499f421096c2efc45c298dc9d9a993d2 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-05  Richard Guenther  <rguenther@suse.de>
+
+       PR debug/41273
+       * g++.dg/torture/pr41273.C: New testcase.
+
 2009-09-05  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/41258
diff --git a/gcc/testsuite/g++.dg/torture/pr41273.C b/gcc/testsuite/g++.dg/torture/pr41273.C
new file mode 100644 (file)
index 0000000..bdce053
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-g" } */
+
+long *H2_ipX_ener_sort;
+double H2_old_populations[2];
+double H2_total;
+
+void H2_LevelPops()
+{
+  double sum_pop = 0.;
+  long nEner = 0;
+  while( nEner < 3 && sum_pop/H2_total < 0.99999 )
+    {
+      long ip = H2_ipX_ener_sort[nEner];
+      sum_pop += H2_old_populations[ip];
+      ++nEner;
+    }
+}
index ac84fb978b06fd1e323afa28ae6c493bba540668..16f4a43dba32178067743d6c5c6036a7ca67af51 100644 (file)
@@ -735,8 +735,8 @@ static void
 get_tmr_operands (gimple stmt, tree expr, int flags)
 {
   /* First record the real operands.  */
-  get_expr_operands (stmt, &TMR_BASE (expr), opf_use);
-  get_expr_operands (stmt, &TMR_INDEX (expr), opf_use);
+  get_expr_operands (stmt, &TMR_BASE (expr), opf_use | (flags & opf_no_vops));
+  get_expr_operands (stmt, &TMR_INDEX (expr), opf_use | (flags & opf_no_vops));
 
   if (TMR_SYMBOL (expr))
     mark_address_taken (TMR_SYMBOL (expr));