OSDN Git Service

PR c++/34918
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Jan 2008 16:22:06 +0000 (16:22 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Jan 2008 16:22:06 +0000 (16:22 +0000)
* error.c (dump_expr): Handle VECTOR_CST.

* g++.dg/other/error23.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131727 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 807f1b5..b039b37 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/34918
+       * error.c (dump_expr): Handle VECTOR_CST.
+
 2008-01-21  Jason Merrill  <jason@redhat.com>
 
        PR c++/33959
index 94f108e..af86cf5 100644 (file)
@@ -1,7 +1,7 @@
 /* Call-backs for C++ error reporting.
    This code is non-reentrant.
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
-   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
@@ -2079,6 +2079,7 @@ dump_expr (tree t, int flags)
     case VEC_DELETE_EXPR:
     case MODOP_EXPR:
     case ABS_EXPR:
+    case VECTOR_CST:
       pp_expression (cxx_pp, t);
       break;
 
index 7f0c716..7447d47 100644 (file)
@@ -1,5 +1,8 @@
 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
 
+       PR c++/34918
+       * g++.dg/other/error23.C: New test.
+
        PR c++/34917
        * g++.dg/ext/vector12.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/other/error23.C b/gcc/testsuite/g++.dg/other/error23.C
new file mode 100644 (file)
index 0000000..d919cda
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/34918
+// { dg-do compile }
+
+int v __attribute ((vector_size (8)));
+bool b = !(v - v);     // { dg-error "could not convert .\\(int __vector__\\)\\{0, 0\\}. to .bool.|in argument to unary" }