Summary: | [4.7 Regression] ICE: verify_gimple failed: type mismatch in array reference with -flto and struct with vararray | ||
---|---|---|---|
Product: | gcc | Reporter: | Zdenek Sojka <zsojka> |
Component: | middle-end | Assignee: | Richard Biener <rguenth> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimhen, matz |
Priority: | P3 | Keywords: | ice-on-valid-code, lto |
Version: | 4.7.0 | ||
Target Milestone: | 4.6.1 | ||
Host: | x86_64-pc-linux-gnu | Target: | x86_64-pc-linux-gnu |
Build: | Known to work: | 4.6.1 | |
Known to fail: | 4.7.0 | Last reconfirmed: | 2011-05-11 04:01:47 |
Attachments: | reduced testcase |
Description
Zdenek Sojka
2011-05-10 17:36:08 UTC
It is caused by revision 172516: http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00711.html 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. 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 Fixed on trunk, queued for backporting. 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 Fixed. |