summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-05 15:15:16 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-05 15:15:16 +0000
commitafcada6efe0e14683e087749cc108f06f4a1b7c1 (patch)
tree7fdf591534a02feeaf7c1ad761bf7bab13b700f6
parent9fc8f414d7309d48e7dc6b23e315c5dedcb1d650 (diff)
downloadgcc-afcada6efe0e14683e087749cc108f06f4a1b7c1.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151454 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41273.C18
-rw-r--r--gcc/tree-ssa-operands.c4
4 files changed, 30 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a8c927f7d3a..9f2b7488a75 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
* tree-ssa.c (useless_type_conversion_p): Drop qualifiers
before comparing function argument types.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cd4617183bb..3373d071499 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..bdce0535583
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41273.C
@@ -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;
+ }
+}
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index ac84fb978b0..16f4a43dba3 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -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));