public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/32914]  New: ICE with -g option
@ 2007-07-27 15:58 dwarak dot rajagopal at amd dot com
  2007-07-28  0:37 ` [Bug debug/32914] ICE in rtl_for_decl_init " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dwarak dot rajagopal at amd dot com @ 2007-07-27 15:58 UTC (permalink / raw)
  To: gcc-bugs

Testcase
"test-ice.cpp"

#include <iostream>
#include <emmintrin.h>

const __m128i tmp={0,0};

g++ -O3 -g -c -msse2 test-ice.cpp

I get the following error:
test-ice.cpp:5: internal compiler error: in rtl_for_decl_init, at
dwarf2out.c:10071
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It compiles fine with "-g" option. This issue is there even in 4.3 mainline as
well.

I tracked this problem to this patch
(http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01567.html). 

Using the following temporary patch fixes this issue. I was basically reverting
the line which causes this issue.

--- dwarf2out.c.orig    2007-07-25 10:29:24.790178000 -0500
+++ dwarf2out.c 2007-07-25 10:21:41.378252000 -0500
@@ -10065,8 +10065,8 @@ rtl_for_decl_init (tree init, tree type)
      immediate RTL constant, expand it now.  We must be careful not to
      reference variables which won't be output.  */

-  else if (initializer_constant_valid_p (init, type)
-          && ! walk_tree (&init, reference_to_unused,NULL,NULL)
+    else if ((INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type))
+            && initializer_constant_valid_p (init, type))
     {
       rtl = expand_expr (init, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);

Thanks,
- Dwarak


-- 
           Summary: ICE with -g option
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dwarak dot rajagopal at amd dot com
 GCC build triplet: x86_64
  GCC host triplet: x86_64
GCC target triplet: x86_64


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


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

* [Bug debug/32914] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
@ 2007-07-28  0:37 ` pinskia at gcc dot gnu dot org
  2007-07-28  0:42 ` [Bug debug/32914] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-28  0:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|major                       |normal


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


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

* [Bug debug/32914] [4.2/4.3 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
  2007-07-28  0:37 ` [Bug debug/32914] ICE in rtl_for_decl_init " pinskia at gcc dot gnu dot org
@ 2007-07-28  0:42 ` pinskia at gcc dot gnu dot org
  2007-08-10  0:53 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-28  0:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-07-28 00:42 -------
Reduced testcase:
typedef int __m128i __attribute__ ((__vector_size__ (16) ));
const __m128i tmp={0,0};


This is a blocker for everyone using vectors with g++.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|x86_64                      |
   GCC host triplet|x86_64                      |
 GCC target triplet|x86_64                      |dwarf2
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-07-28 00:42:23
               date|                            |
            Summary|ICE in rtl_for_decl_init    |[4.2/4.3 Regression] ICE in
                   |with -g option              |rtl_for_decl_init with -g
                   |                            |option
   Target Milestone|---                         |4.2.2


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


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

* [Bug debug/32914] [4.2/4.3 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
  2007-07-28  0:37 ` [Bug debug/32914] ICE in rtl_for_decl_init " pinskia at gcc dot gnu dot org
  2007-07-28  0:42 ` [Bug debug/32914] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-08-10  0:53 ` mmitchel at gcc dot gnu dot org
  2007-08-20 11:00 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-08-10  0:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug debug/32914] [4.2/4.3 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
                   ` (2 preceding siblings ...)
  2007-08-10  0:53 ` mmitchel at gcc dot gnu dot org
@ 2007-08-20 11:00 ` jakub at gcc dot gnu dot org
  2007-08-28  9:45 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-08-20 11:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2007-
                   |                            |08/msg01254.html
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-07-28 00:42:23         |2007-08-20 10:59:54
               date|                            |


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


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

* [Bug debug/32914] [4.2/4.3 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
                   ` (3 preceding siblings ...)
  2007-08-20 11:00 ` jakub at gcc dot gnu dot org
@ 2007-08-28  9:45 ` jakub at gcc dot gnu dot org
  2007-08-31  7:25 ` [Bug debug/32914] [4.2 " jakub at gcc dot gnu dot org
  2007-08-31  7:30 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-08-28  9:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2007-08-28 09:45 -------
Subject: Bug 32914

Author: jakub
Date: Tue Aug 28 09:44:57 2007
New Revision: 127854

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127854
Log:
        PR debug/32914
        * dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
        initializer, use build_vector_from_ctor if possible to create
        VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
        even after this, return NULL.

        * d++.dg/debug/const3.C: New test.
        * d++.dg/debug/const4.C: New test.
        * d++.dg/debug/dwarf2/const1.C: New test.
        * d++.dg/debug/dwarf2/const2.C: New test.
        * d++.dg/debug/dwarf2/const2b.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/debug/const3.C
    trunk/gcc/testsuite/g++.dg/debug/const4.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/const1.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/const2.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/const2b.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug debug/32914] [4.2 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
                   ` (4 preceding siblings ...)
  2007-08-28  9:45 ` jakub at gcc dot gnu dot org
@ 2007-08-31  7:25 ` jakub at gcc dot gnu dot org
  2007-08-31  7:30 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-08-31  7:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2007-08-31 07:25 -------
Subject: Bug 32914

Author: jakub
Date: Fri Aug 31 07:25:20 2007
New Revision: 127958

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127958
Log:
        PR debug/32914
        * dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
        initializer, use build_vector_from_ctor if possible to create
        VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
        even after this, return NULL.

        * d++.dg/debug/const3.C: New test.
        * d++.dg/debug/const4.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/const3.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/const4.C
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/dwarf2out.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug debug/32914] [4.2 Regression] ICE in rtl_for_decl_init with -g option
  2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
                   ` (5 preceding siblings ...)
  2007-08-31  7:25 ` [Bug debug/32914] [4.2 " jakub at gcc dot gnu dot org
@ 2007-08-31  7:30 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-08-31  7:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2007-08-31 07:30 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-08-31  7:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-27 15:58 [Bug debug/32914] New: ICE with -g option dwarak dot rajagopal at amd dot com
2007-07-28  0:37 ` [Bug debug/32914] ICE in rtl_for_decl_init " pinskia at gcc dot gnu dot org
2007-07-28  0:42 ` [Bug debug/32914] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-08-10  0:53 ` mmitchel at gcc dot gnu dot org
2007-08-20 11:00 ` jakub at gcc dot gnu dot org
2007-08-28  9:45 ` jakub at gcc dot gnu dot org
2007-08-31  7:25 ` [Bug debug/32914] [4.2 " jakub at gcc dot gnu dot org
2007-08-31  7:30 ` jakub 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).