public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28302]  New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
@ 2006-07-07 14:39 reichelt at gcc dot gnu dot org
  2006-07-07 14:39 ` [Bug c++/28302] " reichelt at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-07 14:39 UTC (permalink / raw)
  To: gcc-bugs

The following code snippet causes an ICE since GCC 4.0.2
(and in GCC 3.4.5, 3.4.6):

=============================================
int __attribute__((vector_size(8))) x;

void foo()
{
  ~x;
}
=============================================

  bug.cc: In function 'void foo()':
  bug.cc:5: internal compiler error: in perform_integral_promotions, at
cp/typeck.c:1575
  Please submit a full bug report, [etc.]

The code was rejected before:

  bug.cc: In function `void foo()':
  bug.cc:5: error: wrong type argument to bit-complement

However, it is accepted by the C frontend since GCC 3.3.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with bit-complement for
                    vectors
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
@ 2006-07-07 14:39 ` reichelt at gcc dot gnu dot org
  2006-07-14  0:40 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-07 14:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
  2006-07-07 14:39 ` [Bug c++/28302] " reichelt at gcc dot gnu dot org
@ 2006-07-14  0:40 ` pinskia at gcc dot gnu dot org
  2006-07-17  3:11 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-14  0:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-07-14 00:40 -------
This fixes it for me (but I don't have time to test it):
Index: typeck.c
===================================================================
--- typeck.c    (revision 115413)
+++ typeck.c    (working copy)
@@ -3984,7 +3984,7 @@ build_unary_op (enum tree_code code, tre
       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;



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-14 00:40:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
  2006-07-07 14:39 ` [Bug c++/28302] " reichelt at gcc dot gnu dot org
  2006-07-14  0:40 ` pinskia at gcc dot gnu dot org
@ 2006-07-17  3:11 ` mmitchel at gcc dot gnu dot org
  2006-08-14  0:26 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-17  3:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-17  3:11 ` mmitchel at gcc dot gnu dot org
@ 2006-08-14  0:26 ` pinskia at gcc dot gnu dot org
  2006-08-15  1:54 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-14  0:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-14 00:26 -------
I have time to test this patch later tonight.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-08-14  0:26 ` pinskia at gcc dot gnu dot org
@ 2006-08-15  1:54 ` pinskia at gcc dot gnu dot org
  2006-08-15 16:16 ` patchapp at dberlin dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15  1:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-08-15 01:54 -------
(In reply to comment #2)
> I have time to test this patch later tonight.
testing it right now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-08-15  1:54 ` pinskia at gcc dot gnu dot org
@ 2006-08-15 16:16 ` patchapp at dberlin dot org
  2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: patchapp at dberlin dot org @ 2006-08-15 16:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2006-08-15 16:15 -------
Subject: Bug number PR C++/28302

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00502.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1/4.2 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-08-17  1:57 ` pinskia at gcc dot gnu dot org
  2006-10-07  7:11 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-17  1:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-08-17 01:56 -------
Subject: Bug 28302

Author: pinskia
Date: Thu Aug 17 01:56:47 2006
New Revision: 116205

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116205
Log:
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.

Added:
    trunk/gcc/testsuite/g++.dg/ext/vector3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-08-15 16:16 ` patchapp at dberlin dot org
@ 2006-08-17  1:57 ` pinskia at gcc dot gnu dot org
  2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-17  1:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-08-17 01:57 -------
Fixed on the mainline at least.  Will apply to the 4.1 branch after a week.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
                   |with bit-complement for     |with bit-complement for
                   |vectors                     |vectors


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0/4.1 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2006-10-07  7:11 ` pinskia at gcc dot gnu dot org
  2006-10-07  7:12 ` [Bug c++/28302] [4.0 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-07  7:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-10-07 07:11 -------
Subject: Bug 28302

Author: pinskia
Date: Sat Oct  7 07:11:02 2006
New Revision: 117528

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117528
Log:
2006-10-06  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-10-06  Andrew Pinski  <pinskia@physics.uc.edu>

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



Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/vector3.C
      - copied unchanged from r116205, trunk/gcc/testsuite/g++.dg/ext/vector3.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/typeck.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-10-07  7:11 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-10-07  7:12 ` pinskia at gcc dot gnu dot org
  2006-10-12  4:13 ` pinskia at gcc dot gnu dot org
  2006-10-12  4:14 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-07  7:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-10-07 07:12 -------
Fixed on the 4.1 branch also.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.1.2 4.2.0
            Summary|[4.0/4.1 regression] ICE    |[4.0 regression] ICE with
                   |with bit-complement for     |bit-complement for vectors
                   |vectors                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-10-07  7:12 ` [Bug c++/28302] [4.0 " pinskia at gcc dot gnu dot org
@ 2006-10-12  4:13 ` pinskia at gcc dot gnu dot org
  2006-10-12  4:14 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-12  4:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-10-12 04:13 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/28302] [4.0 regression] ICE with bit-complement for vectors
  2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-10-12  4:13 ` pinskia at gcc dot gnu dot org
@ 2006-10-12  4:14 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-12  4:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-10-12 04:13 -------
Subject: Bug 28302

Author: pinskia
Date: Thu Oct 12 04:13:36 2006
New Revision: 117657

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117657
Log:
2006-10-11  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-10-11  Andrew Pinski  <pinskia@physics.uc.edu>

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



Added:
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/ext/vector3.C
      - copied unchanged from r116205, trunk/gcc/testsuite/g++.dg/ext/vector3.C
Modified:
    branches/gcc-4_0-branch/gcc/cp/ChangeLog
    branches/gcc-4_0-branch/gcc/cp/typeck.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28302


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-10-12  4:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 14:39 [Bug c++/28302] New: [4.0/4.1/4.2 regression] ICE with bit-complement for vectors reichelt at gcc dot gnu dot org
2006-07-07 14:39 ` [Bug c++/28302] " reichelt at gcc dot gnu dot org
2006-07-14  0:40 ` pinskia at gcc dot gnu dot org
2006-07-17  3:11 ` mmitchel at gcc dot gnu dot org
2006-08-14  0:26 ` pinskia at gcc dot gnu dot org
2006-08-15  1:54 ` pinskia at gcc dot gnu dot org
2006-08-15 16:16 ` patchapp at dberlin dot org
2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-08-17  1:57 ` [Bug c++/28302] [4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
2006-10-07  7:11 ` [Bug c++/28302] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-10-07  7:12 ` [Bug c++/28302] [4.0 " pinskia at gcc dot gnu dot org
2006-10-12  4:13 ` pinskia at gcc dot gnu dot org
2006-10-12  4:14 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).