summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-17 01:56:47 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-17 01:56:47 +0000
commiteb7dcea7ca951532d002aecdcd09de6981750565 (patch)
tree6e6c3d7409482015e383a154896b58ab0016f820
parent919df38169fae42392ee8e62910bb49e53e62932 (diff)
downloadppe42-gcc-eb7dcea7ca951532d002aecdcd09de6981750565.tar.gz
ppe42-gcc-eb7dcea7ca951532d002aecdcd09de6981750565.zip
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 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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/typeck.c2
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/ext/vector3.C12
4 files changed, 25 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f69c4ff58f6..cde739dbb95 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 0ded718d4bb..f337328cfcd 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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 (!noconvert)
+ else if (!noconvert && CP_INTEGRAL_TYPE_P (TREE_TYPE (arg)))
arg = perform_integral_promotions (arg);
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9a6bf5666f7..28ab165937f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/ext/vector3.C b/gcc/testsuite/g++.dg/ext/vector3.C
new file mode 100644
index 00000000000..1a67cf76a61
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector3.C
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+// PR c++/28302
+
+int __attribute__((vector_size(8))) x;
+
+void foo()
+{
+ ~x;
+}
+
OpenPOWER on IntegriCloud