This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/35260] New: ICE in ipa-type-escape.c with -fipa-struct-reorg -fipa-type-escape
- From: "alond at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2008 10:20:15 -0000
- Subject: [Bug middle-end/35260] New: ICE in ipa-type-escape.c with -fipa-struct-reorg -fipa-type-escape
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase fails for me when compiled with -O3 -fwhole-program
-combine -fipa-type-escape -fipa-struct-reorg
#include <stdlib.h>
typedef struct str
{
int a;
int b;
} str_type;
int main()
{
str_type *struct1 = malloc (3 * sizeof (str_type));
struct1[1].a = 4;
return 0;
}
The failure is:
try3.c:16: internal compiler error: tree check: expected ssa_name, have
integer_cst in is_array_access_through_pointer_and_index, at
ipa-type-escape.c:1011
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
It seems that the problem occurs when the first access to the array, is not
an access to its first member.
For example - the next testcase will not fail:
#include <stdlib.h>
typedef struct str
{
int a;
int b;
} str_type;
int main()
{
str_type *struct1 = malloc (3 * sizeof (str_type));
struct1[0].a = 3;
struct1[1].a = 4;
return 0;
}
--
Summary: ICE in ipa-type-escape.c with -fipa-struct-reorg -fipa-
type-escape
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: alond at il dot ibm dot com
GCC build triplet: powerpc-suse-linux
GCC host triplet: powerpc-suse-linux
GCC target triplet: powerpc-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35260