aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-03-25 14:46:08 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-03-25 14:46:08 +0000
commitc16fd67643acd718a5355e96c7759b42e8f211f6 (patch)
tree0da6abe60c60c42778149fd307577107d5797313 /gcc
parent5ad29f129eac4c5f092578dd1ae4550abf430557 (diff)
downloadgcc-c16fd67643acd718a5355e96c7759b42e8f211f6.zip
gcc-c16fd67643acd718a5355e96c7759b42e8f211f6.tar.gz
gcc-c16fd67643acd718a5355e96c7759b42e8f211f6.tar.bz2
re PR c++/56694 (Internal compiler error when compiling OpenMP code)
2013-03-25 Richard Biener <rguenther@suse.de> PR middle-end/56694 * tree-eh.c (lower_eh_must_not_throw): Strip BLOCKs from the must-not-throw stmt location. * g++.dg/torture/pr56694.C: New testcase. From-SVN: r197047
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56694.C30
-rw-r--r--gcc/tree-eh.c3
4 files changed, 44 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c3ac95..593d492 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56694
+ * tree-eh.c (lower_eh_must_not_throw): Strip BLOCKs from the
+ must-not-throw stmt location.
+
2013-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.c (arm_emit_load_exclusive): Add acq parameter.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7e1cd5b..06eb1a6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,10 @@
+2013-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56694
+ * g++.dg/torture/pr56694.C: New testcase.
+
2013-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
PR target/56720
* gcc.target/arm/neon-vcond-gt.c: New test.
* gcc.target/arm/neon-vcond-ltgt.c: Likewise.
diff --git a/gcc/testsuite/g++.dg/torture/pr56694.C b/gcc/testsuite/g++.dg/torture/pr56694.C
new file mode 100644
index 0000000..22bfe3c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56694.C
@@ -0,0 +1,30 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+class GException {
+public:
+ class vector_mismatch {
+ public:
+ vector_mismatch(int size1, int size2);
+ };
+};
+class GVector{
+public:
+ GVector& operator+=(const GVector& v);
+ int m_num;
+ double* m_data;
+};
+inline GVector& GVector::operator+= (const GVector& v)
+{
+ if (m_num != v.m_num)
+ throw GException::vector_mismatch(m_num, v.m_num);
+ for (int i = 0; i < m_num; ++i) m_data[i] += v.m_data[i];
+};
+void eval(GVector* m_gradient, GVector* vect_cpy_grad, int n)
+{
+#pragma omp sections
+ {
+ for (int i = 0; i < n; ++i)
+ *m_gradient += vect_cpy_grad[i];
+ }
+}
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 6b9dac9..973782b 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1855,7 +1855,8 @@ lower_eh_must_not_throw (struct leh_state *state, gimple tp)
this_region = gen_eh_region_must_not_throw (state->cur_region);
this_region->u.must_not_throw.failure_decl
= gimple_eh_must_not_throw_fndecl (inner);
- this_region->u.must_not_throw.failure_loc = gimple_location (tp);
+ this_region->u.must_not_throw.failure_loc
+ = LOCATION_LOCUS (gimple_location (tp));
/* In order to get mangling applied to this decl, we must mark it
used now. Otherwise, pass_ipa_free_lang_data won't think it