public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/34651]  New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
@ 2008-01-03 17:41 tbm at cyrius dot com
  2008-01-03 17:42 ` [Bug target/34651] " tbm at cyrius dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2008-01-03 17:41 UTC (permalink / raw)
  To: gcc-bugs

I get the following ICE with trunk from 20071212 on hppa (but not
on x86_64):

tbm@tx:~$ /usr/lib/gcc-snapshot/bin/g++ -c -Wno-multichar -O2 libgtkol-cmenu.ii
cmenu.cpp: In member function 'virtual void
CMenuItem::Serialize(CXMLElementNode*&, int)':
cmenu.cpp:551: internal compiler error: in set_value_range, at tree-vrp.c:321
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.
tbm@tx:~$ /usr/lib/gcc-snapshot/bin/g++ -c -Wno-multichar -O1 libgtkol-cmenu.ii
tbm@tx:~$


-- 
           Summary: [4.3 Regression] ICE in set_value_range, at tree-
                    vrp.c:321
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com
GCC target triplet: hppa-linux-gnu


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


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

* [Bug target/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
@ 2008-01-03 17:42 ` tbm at cyrius dot com
  2008-01-03 17:45 ` [Bug tree-optimization/34651] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2008-01-03 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tbm at cyrius dot com  2008-01-03 17:18 -------
Created an attachment (id=14868)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14868&action=view)
preprocessed source


-- 


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
  2008-01-03 17:42 ` [Bug target/34651] " tbm at cyrius dot com
@ 2008-01-03 17:45 ` pinskia at gcc dot gnu dot org
  2008-01-09 17:09 ` rguenth 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 @ 2008-01-03 17:45 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
          Component|target                      |tree-optimization
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.3.0


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
  2008-01-03 17:42 ` [Bug target/34651] " tbm at cyrius dot com
  2008-01-03 17:45 ` [Bug tree-optimization/34651] " pinskia at gcc dot gnu dot org
@ 2008-01-09 17:09 ` rguenth at gcc dot gnu dot org
  2008-01-09 17:37 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-09 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-09 16:31 -------
(gdb) up
#1  0x0000000000cf4cf2 in set_value_range (vr=0x7fff3e9f5f70, t=VR_RANGE, 
    min=0x2adb6c10ea80, max=0x2adb6ed76510, equiv=0x18ac910)
    at /space/rguenther/src/svn/trunk/gcc/tree-vrp.c:321
321           gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
(gdb) call debug_tree (max)
 <integer_cst 0x2adb6ed76510 type <boolean_type 0x2adb6c1b2540 Bool> constant
invariant -2>

huh.

Probably the VR extracted from

  inHotKey$Shift_120 = SR.658_119 & 0xfffffffffffffffffffffffffffffffe;

which contains a non-normalized integer constant.  Generated by SRA.

It's also an incredibly stupid initialization sequence.  Meh.

#0  build2_stat (code=BIT_AND_EXPR, tt=0x2b4fb8c8d540, arg0=0x2b4fbb850aa0, 
    arg1=0x2b4fbb851510) at /space/rguenther/src/svn/trunk/gcc/tree.c:3097
#1  0x0000000000914256 in fold_build2_stat (code=BIT_AND_EXPR, 
    type=0x2b4fb8c8d540, op0=0x2b4fbb850aa0, op1=0x2b4fbb851510)
    at /space/rguenther/src/svn/trunk/gcc/fold-const.c:13652
#2  0x0000000000ba0122 in sra_build_assignment (dst=0x2b4fbb850960, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2233
#3  0x0000000000ba1600 in sra_build_bf_assignment (dst=0x2b4fbb8530f0, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2392
#4  0x0000000000ba2d5a in sra_build_elt_assignment (elt=0x1521980, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2548
#5  0x0000000000ba320b in generate_element_copy (dst=0x1521980, src=0x1521b10, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2631
#6  0x0000000000ba3162 in generate_element_copy (dst=0x15218e0, src=0x1521a70, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2622
#7  0x0000000000ba3162 in generate_element_copy (dst=0x15216b0, src=0x1521660, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2622
#8  0x0000000000ba78c1 in scalarize_copy (lhs_elt=0x15216b0, 
    rhs_elt=0x1521660, bsi=0x7ffff1f1d880)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:3341

The fact that sra_build_assignment builds the mask it uses _without_
truncating the integer constants(!) is bogus.  It looks like it should
perform the masking operation in a different type instead.

Or, why produce a mask operation at all here?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
                   ` (2 preceding siblings ...)
  2008-01-09 17:09 ` rguenth at gcc dot gnu dot org
@ 2008-01-09 17:37 ` rguenth at gcc dot gnu dot org
  2008-01-09 21:38 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-09 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-09 16:43 -------
Reducing.


-- 


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
                   ` (3 preceding siblings ...)
  2008-01-09 17:37 ` rguenth at gcc dot gnu dot org
@ 2008-01-09 21:38 ` rguenth at gcc dot gnu dot org
  2008-01-10 14:50 ` rguenth at gcc dot gnu dot org
  2008-01-10 15:02 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-09 21:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-01-09 20:36 -------
Reduced testcase, ICEs on a x86_64 -> hppa-linux cross with -O2.

typedef bool Bool;
struct CString {
    CString (const char * =__null);
    CString & operator += (const CString &);
};
struct THotKey {
   short Key;
   Bool Control;
   Bool Shift;
   Bool Alt;
};
THotKey m_HotKey;
THotKey GetHotKey () { return m_HotKey; }
void Serialize ()
{  
   THotKey inHotKey (GetHotKey());
   CString outCombinaison (inHotKey.Control                                    
                           ? ((inHotKey.Alt || inHotKey.Shift)                 
                              ? "ctrl+" : "ctrl")
                           : __null);
   outCombinaison += inHotKey.Alt ? inHotKey.Shift ? "alt+" : "alt" : "";
   outCombinaison += inHotKey.Shift ? "shift" : "";
}


-- 

rguenth 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         |2008-01-09 20:36:32
               date|                            |


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
                   ` (4 preceding siblings ...)
  2008-01-09 21:38 ` rguenth at gcc dot gnu dot org
@ 2008-01-10 14:50 ` rguenth at gcc dot gnu dot org
  2008-01-10 15:02 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-10 14:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-01-10 14:28 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321
  2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
                   ` (5 preceding siblings ...)
  2008-01-10 14:50 ` rguenth at gcc dot gnu dot org
@ 2008-01-10 15:02 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-10 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-01-10 14:29 -------
Subject: Bug 34651

Author: rguenth
Date: Thu Jan 10 14:28:40 2008
New Revision: 131442

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131442
Log:
2008-01-10  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/34651
        * tree-sra.c (sra_build_assignment): Sanitize.  Use the correct
        types and ordering for masking and converting.

        * g++.dg/torture/pr34651.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr34651.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-sra.c


-- 


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


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

end of thread, other threads:[~2008-01-10 14:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-03 17:41 [Bug target/34651] New: [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321 tbm at cyrius dot com
2008-01-03 17:42 ` [Bug target/34651] " tbm at cyrius dot com
2008-01-03 17:45 ` [Bug tree-optimization/34651] " pinskia at gcc dot gnu dot org
2008-01-09 17:09 ` rguenth at gcc dot gnu dot org
2008-01-09 17:37 ` rguenth at gcc dot gnu dot org
2008-01-09 21:38 ` rguenth at gcc dot gnu dot org
2008-01-10 14:50 ` rguenth at gcc dot gnu dot org
2008-01-10 15:02 ` rguenth 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).