I know this is being reported again, but this seems to be occuring again after
being fixed.
This is the same bug that was reported in #29826 but it has now happened again
in gcc-4.2.
The test program is essentially the same as was given in the old version.
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
struct s
{
const char *x1;
const char *x2;
};
extern __attribute__((dllimport)) struct s v[];
int z();
int f()
{
int i;
for (i = 0; i < 2; i++)
{
z(v[i].x2);
}
return 0;
}
The error output which occurs is.
test.c: In function 'f':
test.c:19: error: unrecognizable insn:
(insn 15 13 16 3 (set (reg/f:SI 64)
(const:SI (plus:SI (mem:SI (symbol_ref:SI ("#i.v") <var_decl 0xb7d8a0b0
v>) [0 S4 A8])
(const_int 4 [0x4])))) -1 (nil)
(nil))
test.c:19: internal compiler error: in extract_insn, at recog.c:2077
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
And my gcc information is.
Using built-in specs.
Target: i686-pc-mingw32
Configured with: ../gcc-4.2/configure --target=i686-pc-mingw32
--prefix=/crosstools/gccwin-4.2 --enable-shared --enable-threads --disable-nls
--disable-multilib --enable-c99 --enable-long-long --enable-sjlj-exceptions
--enable-languages=c,c++,ada,fortran,objc,obj-c++,java --enable-libada
--enable-boehm-gc
Thread model: win32
gcc version 4.2.0 20070419 (prerelease)
I have tried to report this using the old thread twice now, but it hasn't been
replied to so I decided to start a new bug report for it, forgive me if I made
a mistake.
--
Summary: ICE in GCC 4.2 with dllimport attribute returns
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: arcangelpip at hotmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31636