public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28450]  New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types
@ 2006-07-21 13:20 reichelt at gcc dot gnu dot org
  2006-07-21 13:26 ` [Bug c++/28450] " 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-21 13:20 UTC (permalink / raw)
  To: gcc-bugs

Each of the following lines triggers an ICE since GCC 3.3:

=======================================================
void* p = new __complex__ int ();
void* q = new int __attribute__((vector_size(8))) ();
=======================================================

bug.cc:1: internal compiler error: in build_zero_init, at cp/init.c:252
Please submit a full bug report, [etc.]

This is because build_zero_init doesn't handle COMPLEX_TYPE and VECTOR_TYPE.
Before GCC 3.3 the code was rejected.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with new and complex/vector
                    types
           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=28450


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
@ 2006-07-21 13:26 ` reichelt at gcc dot gnu dot org
  2006-07-26  0:27 ` 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-21 13:26 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=28450


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
  2006-07-21 13:26 ` [Bug c++/28450] " reichelt at gcc dot gnu dot org
@ 2006-07-26  0:27 ` pinskia at gcc dot gnu dot org
  2006-07-31 23:32 ` 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-26  0:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-07-26 00:27 -------
This is valid with extension rule.  We should produce an empty CONSTRUCTOR for
these two cases.  If I get time this weekend I will look more into this.


-- 


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


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
  2006-07-21 13:26 ` [Bug c++/28450] " reichelt at gcc dot gnu dot org
  2006-07-26  0:27 ` pinskia at gcc dot gnu dot org
@ 2006-07-31 23:32 ` mmitchel at gcc dot gnu dot org
  2006-08-18  3:54 ` 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-31 23:32 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=28450


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-31 23:32 ` mmitchel at gcc dot gnu dot org
@ 2006-08-18  3:54 ` pinskia at gcc dot gnu dot org
  2006-08-18  4:02 ` 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-18  3:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-18 03:54 -------
Here is a patch (though I have looked to see if it works with templates yet):
Index: init.c
===================================================================
--- init.c      (revision 116236)
+++ init.c      (working copy)
@@ -178,7 +178,8 @@ build_zero_init (tree type, tree nelts,
        items with static storage duration that are not otherwise
        initialized are initialized to zero.  */
     ;
-  else if (SCALAR_TYPE_P (type))
+  else if (SCALAR_TYPE_P (type)
+          || TREE_CODE (type) == COMPLEX_TYPE)
     init = convert (type, integer_zero_node);
   else if (CLASS_TYPE_P (type))
     {
@@ -248,6 +249,8 @@ build_zero_init (tree type, tree nelts,
       /* Build a constructor to contain the initializations.  */
       init = build_constructor (type, v);
     }
+  else if (TREE_CODE (type) == VECTOR_TYPE)
+    init = fold_convert (type, integer_zero_node);
   else
     gcc_assert (TREE_CODE (type) == REFERENCE_TYPE);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-08-18 03:54:40
               date|                            |


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


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-08-18  3:54 ` pinskia at gcc dot gnu dot org
@ 2006-08-18  4:02 ` pinskia at gcc dot gnu dot org
  2006-08-22 15:43 ` 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-18  4:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-08-18 04:02 -------
Mine.


-- 

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=28450


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-08-18  4:02 ` pinskia at gcc dot gnu dot org
@ 2006-08-22 15:43 ` patchapp at dberlin dot org
  2006-08-23  2:57 ` 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-22 15:43 UTC (permalink / raw)
  To: gcc-bugs



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

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/msg00793.html


-- 


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


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

* [Bug c++/28450] [4.0/4.1/4.2 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-08-22 15:43 ` patchapp at dberlin dot org
@ 2006-08-23  2:57 ` pinskia at gcc dot gnu dot org
  2006-08-23  3:00 ` [Bug c++/28450] [4.0/4.1 " 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-23  2:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-08-23 02:57 -------
Subject: Bug 28450

Author: pinskia
Date: Wed Aug 23 02:56:43 2006
New Revision: 116341

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116341
Log:
2006-08-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28450
        * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
        COMPLEX_TYPEs.


2006-08-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28450
        * g++.dg/ext/vector4.C: New test.
        * g++.dg/ext/complex1.C: New test.



Added:
    trunk/gcc/testsuite/g++.dg/ext/complex1.C
    trunk/gcc/testsuite/g++.dg/ext/vector4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28450] [4.0/4.1 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-08-23  2:57 ` pinskia at gcc dot gnu dot org
@ 2006-08-23  3:00 ` pinskia at gcc dot gnu dot org
  2006-10-06 13:07 ` 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-23  3:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-08-23 02:59 -------
Fixed on the mainline, will apply to the branches 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 new and complex/vector |with new and complex/vector
                   |types                       |types


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


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

* [Bug c++/28450] [4.0/4.1 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-08-23  3:00 ` [Bug c++/28450] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-10-06 13:07 ` pinskia at gcc dot gnu dot org
  2006-10-06 13:09 ` [Bug c++/28450] [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-06 13:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-10-06 13:07 -------
Subject: Bug 28450

Author: pinskia
Date: Fri Oct  6 13:06:56 2006
New Revision: 117502

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

        PR C++/28450
        * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
        COMPLEX_TYPEs.

2006-10-06  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28450
        * g++.dg/ext/vector4.C: New test.
        * g++.dg/ext/complex1.C: New test.



Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/complex1.C
      - copied unchanged from r116341,
trunk/gcc/testsuite/g++.dg/ext/complex1.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/vector4.C
      - copied unchanged from r116341, trunk/gcc/testsuite/g++.dg/ext/vector4.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/init.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28450] [4.0 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-10-06 13:07 ` pinskia at gcc dot gnu dot org
@ 2006-10-06 13:09 ` pinskia at gcc dot gnu dot org
  2006-10-11  3:10 ` pinskia at gcc dot gnu dot org
  2006-10-11  3:12 ` 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-06 13:09 UTC (permalink / raw)
  To: gcc-bugs



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


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1 regression] ICE    |[4.0 regression] ICE with
                   |with new and complex/vector |new and complex/vector types
                   |types                       |


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


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

* [Bug c++/28450] [4.0 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-10-06 13:09 ` [Bug c++/28450] [4.0 " pinskia at gcc dot gnu dot org
@ 2006-10-11  3:10 ` pinskia at gcc dot gnu dot org
  2006-10-11  3:12 ` 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-11  3:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-10-11 03:10 -------
Subject: Bug 28450

Author: pinskia
Date: Wed Oct 11 03:10:25 2006
New Revision: 117627

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117627
Log:
2006-10-10  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28450
        * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
        COMPLEX_TYPEs.

2006-10-10  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28450
        * g++.dg/ext/vector4.C: New test.
        * g++.dg/ext/complex1.C: New test.



Added:
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/ext/complex1.C
      - copied unchanged from r116341,
trunk/gcc/testsuite/g++.dg/ext/complex1.C
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/ext/vector4.C
      - copied unchanged from r116341, trunk/gcc/testsuite/g++.dg/ext/vector4.C
Modified:
    branches/gcc-4_0-branch/gcc/cp/ChangeLog
    branches/gcc-4_0-branch/gcc/cp/init.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28450] [4.0 regression] ICE with new and complex/vector types
  2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-10-11  3:10 ` pinskia at gcc dot gnu dot org
@ 2006-10-11  3:12 ` 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-11  3:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-10-11 03:12 -------
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=28450


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

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-21 13:20 [Bug c++/28450] New: [4.0/4.1/4.2 regression] ICE with new and complex/vector types reichelt at gcc dot gnu dot org
2006-07-21 13:26 ` [Bug c++/28450] " reichelt at gcc dot gnu dot org
2006-07-26  0:27 ` pinskia at gcc dot gnu dot org
2006-07-31 23:32 ` mmitchel at gcc dot gnu dot org
2006-08-18  3:54 ` pinskia at gcc dot gnu dot org
2006-08-18  4:02 ` pinskia at gcc dot gnu dot org
2006-08-22 15:43 ` patchapp at dberlin dot org
2006-08-23  2:57 ` pinskia at gcc dot gnu dot org
2006-08-23  3:00 ` [Bug c++/28450] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-10-06 13:07 ` pinskia at gcc dot gnu dot org
2006-10-06 13:09 ` [Bug c++/28450] [4.0 " pinskia at gcc dot gnu dot org
2006-10-11  3:10 ` pinskia at gcc dot gnu dot org
2006-10-11  3:12 ` 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).