OSDN Git Service

2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Aug 2006 01:56:47 +0000 (01:56 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Aug 2006 01:56:47 +0000 (01:56 +0000)
        PR c++/28302
        * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
        perform_integral_promotions for non integral type
2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28302
        * g++.dg/ext/vector3.C: New test.

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

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

index f69c4ff..cde739d 100644 (file)
@@ -1,3 +1,9 @@
+2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/28302
+       * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
+       perform_integral_promotions for non integral type
+
 2006-08-16  Jason Merrill  <jason@redhat.com>
 
        PR c++/28385
 2006-08-16  Jason Merrill  <jason@redhat.com>
 
        PR c++/28385
index 0ded718..f337328 100644 (file)
@@ -3996,7 +3996,7 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
       else if (!(arg = build_expr_type_conversion (WANT_INT | WANT_ENUM,
                                                   arg, true)))
        errstring = "wrong type argument to bit-complement";
       else if (!(arg = build_expr_type_conversion (WANT_INT | WANT_ENUM,
                                                   arg, true)))
        errstring = "wrong type argument to bit-complement";
-      else if (!noconvert)
+      else if (!noconvert && CP_INTEGRAL_TYPE_P (TREE_TYPE (arg)))
        arg = perform_integral_promotions (arg);
       break;
 
        arg = perform_integral_promotions (arg);
       break;
 
index 9a6bf56..28ab165 100644 (file)
@@ -1,4 +1,9 @@
-2006-08-16  Zdenek Dvorak <dvorakz@suse.cz>
+2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR C++/28302
+       * g++.dg/ext/vector3.C: New test.
+
+2006-08-16  Zdenek Dvorak  <dvorakz@suse.cz>
 
        PR gcov/profile/26570
        * gcc.dg/pr26570.c: New test.
 
        PR gcov/profile/26570
        * gcc.dg/pr26570.c: New test.
diff --git a/gcc/testsuite/g++.dg/ext/vector3.C b/gcc/testsuite/g++.dg/ext/vector3.C
new file mode 100644 (file)
index 0000000..1a67cf7
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+// PR c++/28302
+
+int __attribute__((vector_size(8))) x;
+
+void foo()
+{
+  ~x;
+}
+