public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
@ 2011-05-10 17:49 zsojka at seznam dot cz
  2011-05-11  4:33 ` [Bug middle-end/48953] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-05-10 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.7 Regression] ICE: verify_gimple failed: type
                    mismatch in array reference with -flto and struct with
                    vararray
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 24219
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24219
reduced testcase

Compiler output:
$ gcc -O -flto -fno-tree-dce testcase.c 
In file included from :0:0:
testcase.c: In function 'main':
testcase.c:11:5: error: type mismatch in array reference
struct S

struct S

# .MEM_11 = VDEF <.MEM_10>
MEM[(struct S[2] *)s.1_7][0]{lb: 0 sz: 12}.value = 0;

testcase.c:11:5: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /mnt/svn/gcc-trunk/binary-latest/bin/gcc returned 1 exit status
collect2: lto-wrapper returned 1 exit status

Tested revisions:
r173586 - crash
4.6 r173059 - OK (yes,rtl,df checking)


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
@ 2011-05-11  4:33 ` hjl.tools at gmail dot com
  2011-05-11 10:20 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-11  4:33 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.05.11 04:01:47
                 CC|                            |matz at gcc dot gnu.org
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-11 04:01:47 UTC ---
It is caused by revision 172516:

http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00711.html


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
  2011-05-11  4:33 ` [Bug middle-end/48953] " hjl.tools at gmail dot com
@ 2011-05-11 10:20 ` rguenth at gcc dot gnu.org
  2011-05-11 12:35 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-11 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-11 09:41:45 UTC ---
The rev. allowed inlining to happen.  We end up with two copies of type S
for some reason - inlining is supposed to copy variable-size types but
probably does not adjust reference tree types to those copies.  I'm not sure
why this doesn't trigger without LTO (we inline during early inlining).

I suppose the two types also exist w/o LTO but they are marked compatible
via TYPE_CANONICAL which isn't re-set by copy_node.  Thus, this is an
issue with re-constructing TYPE_CANONICAL.

Mine.


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
  2011-05-11  4:33 ` [Bug middle-end/48953] " hjl.tools at gmail dot com
  2011-05-11 10:20 ` rguenth at gcc dot gnu.org
@ 2011-05-11 12:35 ` rguenth at gcc dot gnu.org
  2011-05-11 12:58 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-11 12:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-11 12:23:15 UTC ---
Author: rguenth
Date: Wed May 11 12:23:12 2011
New Revision: 173653

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173653
Log:
2011-05-11  Richard Guenther  <rguenther@suse.de>

    PR middle-end/48953
    * tree-inline.c (remap_gimple_op_r): Also remap types of MEM_REFs.

    * gcc.dg/torture/pr48953.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr48953.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-05-11 12:35 ` rguenth at gcc dot gnu.org
@ 2011-05-11 12:58 ` rguenth at gcc dot gnu.org
  2011-05-31 12:33 ` rguenth at gcc dot gnu.org
  2011-05-31 12:55 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-11 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-11 12:23:49 UTC ---
Fixed on trunk, queued for backporting.


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-05-11 12:58 ` rguenth at gcc dot gnu.org
@ 2011-05-31 12:33 ` rguenth at gcc dot gnu.org
  2011-05-31 12:55 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-31 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.7.0                       |4.6.1

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-31 12:24:14 UTC ---
Fixed.


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

* [Bug middle-end/48953] [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray
  2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-05-31 12:33 ` rguenth at gcc dot gnu.org
@ 2011-05-31 12:55 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-31 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-31 12:23:58 UTC ---
Author: rguenth
Date: Tue May 31 12:23:55 2011
New Revision: 174475

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174475
Log:
2011-05-31  Richard Guenther  <rguenther@suse.de>

    Backport from mainline
    2011-05-11  Richard Guenther  <rguenther@suse.de>

    PR middle-end/48953
    * tree-inline.c (remap_gimple_op_r): Also remap types of MEM_REFs.

    * gcc.dg/torture/pr48953.c: New testcase.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/torture/pr48953.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-inline.c


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

end of thread, other threads:[~2011-05-31 12:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 17:49 [Bug middle-end/48953] New: [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray zsojka at seznam dot cz
2011-05-11  4:33 ` [Bug middle-end/48953] " hjl.tools at gmail dot com
2011-05-11 10:20 ` rguenth at gcc dot gnu.org
2011-05-11 12:35 ` rguenth at gcc dot gnu.org
2011-05-11 12:58 ` rguenth at gcc dot gnu.org
2011-05-31 12:33 ` rguenth at gcc dot gnu.org
2011-05-31 12:55 ` rguenth at gcc dot gnu.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).