public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/44941]  New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
@ 2010-07-14 23:24 zsojka at seznam dot cz
  2010-07-14 23:25 ` [Bug rtl-optimization/44941] " zsojka at seznam dot cz
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-14 23:24 UTC (permalink / raw)
  To: gcc-bugs

Command line:
$ gcc -O[123s] testcase.c

Compiler output:
$ gcc -O testcase.c
testcase.c: In function 'foo':
testcase.c:7:7: internal compiler error: RTL check: expected code 'mem', have
'reg' in emit_block_move_hints, at expr.c:1189

Unreduced testcase crashes with:
$ gcc -O rarpd.i
rarpd.c: In function 'load_if':
rarpd.c:203:41: internal compiler error: in make_decl_rtl, at varasm.c:1346

Reduced testcase without rtl checking crashes with:
$ gcc -O testcase.c
testcase.c: In function 'foo':
testcase.c:7:7: internal compiler error: Segmentation fault

Tested revisions:
r162193 - crash
r162056 - crash
r161659 - crash
r161170 - OK


-- 
           Summary: [4.6 Regression] ICE: RTL check: expected code 'mem',
                    have 'reg' in emit_block_move_hints, at expr.c:1189
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
@ 2010-07-14 23:25 ` zsojka at seznam dot cz
  2010-07-15  8:08 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-14 23:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-07-14 23:25 -------
Created an attachment (id=21204)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21204&action=view)
reduced testcase (from iptraf sources)

Command line:
$ gcc -O pr44941.c


-- 


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
  2010-07-14 23:25 ` [Bug rtl-optimization/44941] " zsojka at seznam dot cz
@ 2010-07-15  8:08 ` rguenth at gcc dot gnu dot org
  2010-07-15 14:38 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-15  8:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
  2010-07-14 23:25 ` [Bug rtl-optimization/44941] " zsojka at seznam dot cz
  2010-07-15  8:08 ` rguenth at gcc dot gnu dot org
@ 2010-07-15 14:38 ` hjl dot tools at gmail dot com
  2010-07-15 15:47 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-15 14:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2010-07-15 14:38 -------
It is caused by revision 161655:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00006.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-15 14:38:02
               date|                            |


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-07-15 14:38 ` hjl dot tools at gmail dot com
@ 2010-07-15 15:47 ` rguenth at gcc dot gnu dot org
  2010-07-19  9:51 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-15 15:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-07-15 15:47 -------
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-07-15 14:38:02         |2010-07-15 15:47:16
               date|                            |


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-07-15 15:47 ` rguenth at gcc dot gnu dot org
@ 2010-07-19  9:51 ` rguenth at gcc dot gnu dot org
  2010-07-19 13:36 ` zsojka at seznam dot cz
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-19  9:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-07-19 09:51 -------
#3  0x000000000060425e in store_one_arg (arg=0x7fffffffbc10, 
    argblock=0x7ffff7ee0540, flags=0, variable_size=0, reg_parm_stack_space=0)
    at /space/rguenther/src/svn/trunk/gcc/calls.c:4309
4309          emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval),
size_rtx,
(gdb) call debug_rtx (arg->value)
(reg:SI 61)
(gdb) p arg->mode
$2 = BLKmode
(gdb) call debug_rtx (size_rtx)
(const_int 0 [0])
(gdb) call debug_tree (arg->tree_value)
 <mem_ref 0x7ffff7ff90a8
    type <record_type 0x7ffff5ae02a0 S type_0 BLK
        size <integer_cst 0x7ffff7ed2b18 constant 0>
        unit size <integer_cst 0x7ffff7ed2410 constant 0>
        align 8 symtab 0 alias set -1 canonical type 0x7ffff5ae02a0 context
<translation_unit_decl 0x7ffff7efb958 D.1621>
        pointer_to_this <pointer_type 0x7ffff5ae0498> chain <type_decl
0x7ffff7efb8a0 D.1615>>

    arg 0 <addr_expr 0x7ffff5b43030
        type <pointer_type 0x7ffff7ef6540 type <integer_type 0x7ffff7ee7498
int>
            unsigned DI
            size <integer_cst 0x7ffff7ed27a8 constant 64>
            unit size <integer_cst 0x7ffff7ed27d0 constant 8>
            align 64 symtab 0 alias set -1 canonical type 0x7ffff7ef6540>

        arg 0 <parm_decl 0x7ffff7edb908 i type <integer_type 0x7ffff7ee7498
int>
            used SI file pr44941.c line 5 col 15
            size <integer_cst 0x7ffff7ed26e0 constant 32>
            unit size <integer_cst 0x7ffff7ed23e8 constant 4>
            align 32 context <function_decl 0x7ffff5afb100 foo>
            (reg/v:SI 58 [ i ]) arg-type <integer_type 0x7ffff7ee7498 int>
            incoming-rtl (reg:SI 5 di [ i ])>
        pr44941.c:7:21>
    arg 1 <integer_cst 0x7ffff5adc668 type <pointer_type 0x7ffff5ae0498>
constant 0>
    pr44941.c:7:7>

I have a patch.


-- 


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-07-19  9:51 ` rguenth at gcc dot gnu dot org
@ 2010-07-19 13:36 ` zsojka at seznam dot cz
  2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
  2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-19 13:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from zsojka at seznam dot cz  2010-07-19 13:35 -------
Thank you for fixing this.

It seems the original ICE (in make_decl_rtl, at varasm.c:1346) is different, so
I opened it as PR44988.


-- 


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-07-19 13:36 ` zsojka at seznam dot cz
@ 2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
  2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-19 15:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-07-19 15:40 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug rtl-optimization/44941] [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189
  2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
@ 2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-19 15:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-07-19 15:40 -------
Subject: Bug 44941

Author: rguenth
Date: Mon Jul 19 15:39:51 2010
New Revision: 162308

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162308
Log:
2010-07-19  Richard Guenther  <rguenther@suse.de>

        PR middle-end/44941
        * expr.c (emit_block_move_hints): Move zero size check first.
        Move asserts to more useful places.
        * calls.c (load_register_parameters): Check for zero size.

        * gcc.c-torture/compile/pr44941.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr44941.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2010-07-19 15:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-14 23:24 [Bug rtl-optimization/44941] New: [4.6 Regression] ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189 zsojka at seznam dot cz
2010-07-14 23:25 ` [Bug rtl-optimization/44941] " zsojka at seznam dot cz
2010-07-15  8:08 ` rguenth at gcc dot gnu dot org
2010-07-15 14:38 ` hjl dot tools at gmail dot com
2010-07-15 15:47 ` rguenth at gcc dot gnu dot org
2010-07-19  9:51 ` rguenth at gcc dot gnu dot org
2010-07-19 13:36 ` zsojka at seznam dot cz
2010-07-19 15:40 ` rguenth at gcc dot gnu dot org
2010-07-19 15:40 ` 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).