[Bug c/29826] New: __attribute__ dllimport makes optimization crash on cygwin
Denis dot Excoffier at airbus dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 14 09:03:00 GMT 2006
the exact version of GCC is 4.1.1
the system type is i686-pc-cygwin
the options given when GCC was configured/built:
--prefix=/tmp/local/unixutil/gcc-4.1.1
--with-local-prefix=/usr/local/myCompanyName
("myCompanyName" is not the exact wording)
(also, there is a symlink /tmp/local/unixutil/gcc -> gcc-4.1.1)
the complete command line that triggers the bug:
/tmp/local/unixutil/gcc/bin/gcc -O -Wall -Wextra -c zim.c
the compiler output (error messages, warnings, etc.):
stdout: nothing
stderr:
zim.c: In function 'ffff':
zim.c:16: error: unrecognizable insn:
(insn 20 19 21 2 (set (reg:SI 66)
(const:SI (plus:SI (mem:SI (symbol_ref:SI ("#i.vvvv") <var_decl
0x194500b0 vvvv>) [0 S4 A8])
(const_int 4 [0x4])))) -1 (nil)
(nil))
zim.c:16: internal compiler error: in extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
zim.o: not created
the preprocessed file: see below
additional remarks:
1) if "-O" is removed, all seems OK
2) if "__attribute__((dllimport))" is removed, all seems OK
3) if "-Wall" or "-Wextra" is removed, no change (still crash)
---zim.i-----------------------------------------------------
# 1 "zim.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "zim.c"
struct ssss {
const char *xxxx1;
const char *xxxx2;
};
extern __attribute__((dllimport)) struct ssss vvvv[];
int zzzz();
int ffff() {
int i;
for (i = 0; i < 2; i++) {
zzzz(vvvv[i].xxxx2);
};
return(0);
};
-------------------------------------------------------------
--
Summary: __attribute__ dllimport makes optimization crash on
cygwin
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Denis dot Excoffier at airbus dot com
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29826
More information about the Gcc-bugs
mailing list