]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression error>)
authorJakub Jelinek <jakub@redhat.com>
Tue, 11 Apr 2017 08:51:40 +0000 (10:51 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 11 Apr 2017 08:51:40 +0000 (10:51 +0200)
PR c++/80363
* error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.

* g++.dg/ext/pr80363.C: New test.

From-SVN: r246834

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/pr80363.C [new file with mode: 0644]

index b7cbca58e95d0351dcaea35bca91024813430840..e16efdccb8eadfeeb9ddd181b2502ce621233b97 100644 (file)
@@ -1,3 +1,8 @@
+2017-04-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/80363
+       * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
+
 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/80176
index d8c5d5ea41245ae57fd9b481b0d8b0c22df4f366..f93e8b67841c9e020b9db88bfe1c6a253693c8ed 100644 (file)
@@ -2080,6 +2080,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
       break;
 
     case COND_EXPR:
+    case VEC_COND_EXPR:
       pp_cxx_left_paren (pp);
       dump_expr (pp, TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS);
       pp_string (pp, " ? ");
index a2d0865502843c7ab022b2266900d52f897bd6ba..d0f5620d8447382b8480125264bb9c2c2d27a2dc 100644 (file)
@@ -1,3 +1,8 @@
+2017-04-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/80363
+       * g++.dg/ext/pr80363.C: New test.
+
 2017-04-11  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
 
        * gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Require double64plus.
diff --git a/gcc/testsuite/g++.dg/ext/pr80363.C b/gcc/testsuite/g++.dg/ext/pr80363.C
new file mode 100644 (file)
index 0000000..2ff7bca
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/80363
+// { dg-do compile }
+
+typedef int V __attribute__((vector_size (16)));
+
+int
+foo (V *a, V *b)
+{
+  if (*a < *b) // { dg-error "could not convert\[^#]*from" }
+    return 1;
+  return 0;
+}