Note that the following code invokes undefined behavior. I haven't been
able to reproduce this bug on platforms other than Cygwin.
% cat gcc-bug.c
double func();
int main(void)
{
double d = func(42);
return 0;
}
double func(double arg)
{
return arg * 2.0;
}
% uname -a
CYGWIN_NT-5.1 sedna 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown
Cygwin
% gcc --version
gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% gcc -c -O2 gcc-bug.c
% gcc -c -O3 gcc-bug.c
gcc-bug.c: In function `main':
gcc-bug.c:10: internal compiler error: in convert_move, at expr.c:563
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE in convert_move with -O3 (ok at -O2)
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kst at mib dot org
CC: gcc-bugs at gcc dot gnu dot org
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=23665