aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-02-04 23:32:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-02-04 23:32:36 +0100
commit4886ec8e709d547391d199bd88579d0f523f4e2d (patch)
tree02931ee5cccee35af26dbaf8156acf44d9ec6fb5 /gcc
parent5a33f47d99d787af43fc8b27c29cea4e5c1432d8 (diff)
downloadgcc-4886ec8e709d547391d199bd88579d0f523f4e2d.zip
gcc-4886ec8e709d547391d199bd88579d0f523f4e2d.tar.gz
gcc-4886ec8e709d547391d199bd88579d0f523f4e2d.tar.bz2
re PR middle-end/64824 (ICE in gimple verification)
PR c/64824 PR c/64868 gcc/c/ * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR. gcc/cp/ * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR. gcc/c-family/ * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR instead of RDIV_EXPR. Use build_binary_op instead of build2_loc. libgomp/ * testsuite/libgomp.c/pr64824.c: New test. * testsuite/libgomp.c/pr64868.c: New test. * testsuite/libgomp.c++/pr64824.C: New test. * testsuite/libgomp.c++/pr64868.C: New test. From-SVN: r220420
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog8
-rw-r--r--gcc/c-family/c-omp.c5
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-parser.c1
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c1
6 files changed, 26 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 9764b7c..6e4553a 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64824
+ PR c/64868
+ * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
+ instead of RDIV_EXPR. Use build_binary_op instead of
+ build2_loc.
+
2015-01-30 Joseph Myers <joseph@codesourcery.com>
* c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 8715045..86a9f54 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -206,6 +206,9 @@ c_finish_omp_atomic (location_t loc, enum tree_code code,
return error_mark_node;
}
+ if (opcode == RDIV_EXPR)
+ opcode = TRUNC_DIV_EXPR;
+
/* ??? Validate that rhs does not overlap lhs. */
/* Take and save the address of the lhs. From then on we'll reference it
@@ -240,7 +243,7 @@ c_finish_omp_atomic (location_t loc, enum tree_code code,
to do this, and then take it apart again. */
if (swapped)
{
- rhs = build2_loc (loc, opcode, TREE_TYPE (lhs), rhs, lhs);
+ rhs = build_binary_op (loc, opcode, rhs, lhs, 1);
opcode = NOP_EXPR;
}
bool save = in_late_binary_op;
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index f90efeb..4c822f4 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64824
+ PR c/64868
+ * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
+
2015-02-02 Bruno Loff <bruno.loff@gmail.com>
* c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 0387f0e..982ba6a 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -12611,6 +12611,7 @@ restart:
{
case MULT_EXPR:
case TRUNC_DIV_EXPR:
+ case RDIV_EXPR:
case PLUS_EXPR:
case MINUS_EXPR:
case LSHIFT_EXPR:
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 60d7e67..3ab1d77 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64824
+ PR c/64868
+ * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
+
2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/64877
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7168aba..57dfbcc 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -29835,6 +29835,7 @@ restart:
{
case MULT_EXPR:
case TRUNC_DIV_EXPR:
+ case RDIV_EXPR:
case PLUS_EXPR:
case MINUS_EXPR:
case LSHIFT_EXPR: