public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37084]  New: [4.4 regression] ICE in gimple_assign_rhs1
@ 2008-08-11 21:05 reichelt at gcc dot gnu dot org
  2008-08-11 21:06 ` [Bug tree-optimization/37084] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-08-11 21:05 UTC (permalink / raw)
  To: gcc-bugs

The following valid testcase triggers an ICE on mainline when compiled
with "-O" (i686-pc-linux-gnu) or "-o -m32" (x64_64-unknown-linux-gnu):

===================================
struct A
{
  A();
};

inline A foo() { return A(); }

const A a(foo());
===================================

bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
bug.cc:8: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1717
Please submit a full bug report, [etc.]

The regression appeared between 2008-07-26 and 2008-07-29.


-- 
           Summary: [4.4 regression] ICE in gimple_assign_rhs1
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: major
          Priority: P3
         Component: tree-optimization
        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=37084


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
@ 2008-08-11 21:06 ` reichelt at gcc dot gnu dot org
  2008-08-11 21:09 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-08-11 21:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
  2008-08-11 21:06 ` [Bug tree-optimization/37084] " reichelt at gcc dot gnu dot org
@ 2008-08-11 21:09 ` pinskia at gcc dot gnu dot org
  2008-08-12  8:41 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-11 21:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-11 21:07 -------
Most likely introduced by the tuples merge ...


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
  2008-08-11 21:06 ` [Bug tree-optimization/37084] " reichelt at gcc dot gnu dot org
  2008-08-11 21:09 ` pinskia at gcc dot gnu dot org
@ 2008-08-12  8:41 ` rguenth at gcc dot gnu dot org
  2008-08-12  8:47 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-08-12  8:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-12 08:39 -------
Confirmed.

#3  0x00000000006c360a in copy_bb (id=0x7fffffffd920, bb=0x7ffff759c300, 
    frequency_scale=0, count_scale=1)
    at /space/rguenther/src/svn/trunk/gcc/tree-inline.c:1269
1269              new_rhs = force_gimple_operand_gsi (&copy_gsi,
(gdb) l
1264                && gimple_assign_rhs_code (stmt) == NOP_EXPR
1265                && !is_gimple_val (gimple_assign_rhs1 (stmt)))
1266              || id->regimplify)
1267            {
1268              tree new_rhs;
1269              new_rhs = force_gimple_operand_gsi (&copy_gsi,
1270                                                  gimple_assign_rhs1
(stmt),
1271                                                  true, NULL, true,
GSI_SAME_STMT);
1272              gimple_assign_set_rhs1 (stmt, new_rhs);
1273            }


we have id->regimplify set but do not expect to need to deal with a call here.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-12 08:39:51
               date|                            |


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


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-08-12  8:41 ` rguenth at gcc dot gnu dot org
@ 2008-08-12  8:47 ` jakub at gcc dot gnu dot org
  2008-08-12 18:00 ` jakub at gcc dot gnu dot org
  2008-08-14 20:39 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-12  8:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-08-12 08:46 -------
      /* With return slot optimization we can end up with
         non-gimple (foo *)&this->m, fix that here.  */
      if ((is_gimple_assign (stmt)
            && gimple_assign_rhs_code (stmt) == NOP_EXPR
            && !is_gimple_val (gimple_assign_rhs1 (stmt)))
          || id->regimplify)
        {
          tree new_rhs;
          new_rhs = force_gimple_operand_gsi (&copy_gsi,
                                              gimple_assign_rhs1 (stmt),
                                              true, NULL, true, GSI_SAME_STMT);
          gimple_assign_set_rhs1 (stmt, new_rhs);
        }
      else if (id->regimplify)
        gimple_regimplify_operands (stmt, &copy_gsi);

IMNSHO we just need to kill the || id->regimplify from the first if condition,
the then body isn't able to deal with it and the correct
gimple_regimplify_operands call never triggers.


-- 

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                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-08-12 08:39:51         |2008-08-12 08:46:30
               date|                            |


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


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-08-12  8:47 ` jakub at gcc dot gnu dot org
@ 2008-08-12 18:00 ` jakub at gcc dot gnu dot org
  2008-08-14 20:39 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-12 18:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-08-12 17:59 -------
Subject: Bug 37084

Author: jakub
Date: Tue Aug 12 17:57:49 2008
New Revision: 139028

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139028
Log:
        PR tree-optimization/37084
        * tree-inline.c (copy_bb): Call gimple_regimplify_operands
        if id->regimplify, don't assume stmt is a cast assignment.

        * g++.dg/tree-ssa/pr37084.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr37084.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c


-- 


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


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

* [Bug tree-optimization/37084] [4.4 regression] ICE in gimple_assign_rhs1
  2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-08-12 18:00 ` jakub at gcc dot gnu dot org
@ 2008-08-14 20:39 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-14 20:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-08-14 20:38 -------
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=37084


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

end of thread, other threads:[~2008-08-14 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-11 21:05 [Bug tree-optimization/37084] New: [4.4 regression] ICE in gimple_assign_rhs1 reichelt at gcc dot gnu dot org
2008-08-11 21:06 ` [Bug tree-optimization/37084] " reichelt at gcc dot gnu dot org
2008-08-11 21:09 ` pinskia at gcc dot gnu dot org
2008-08-12  8:41 ` rguenth at gcc dot gnu dot org
2008-08-12  8:47 ` jakub at gcc dot gnu dot org
2008-08-12 18:00 ` jakub at gcc dot gnu dot org
2008-08-14 20:39 ` 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).