re PR c++/28302 (ICE with bit-complement for vectors)

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.

From-SVN: r116205
This commit is contained in:
Andrew Pinski 2006-08-16 18:56:47 -07:00
parent 97c074fd44
commit bd289f543a
4 changed files with 25 additions and 2 deletions

View 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

View 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 (!noconvert)
else if (!noconvert && CP_INTEGRAL_TYPE_P (TREE_TYPE (arg)))
arg = perform_integral_promotions (arg);
break;

View 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.

View File

@ -0,0 +1,12 @@
/* { dg-do compile } */
/* { dg-options "" } */
// PR c++/28302
int __attribute__((vector_size(8))) x;
void foo()
{
~x;
}