This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE
- From: "brederlo at informatik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2004 21:42:54 -0000
- Subject: [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I found ICE in ntop and reduced it to the following testcase:
struct { long long a; } *p;
void initNetFlowFunct(void) {
unsigned int b = 4294967295U;
p->a = b;
}
Changing the signedness or size of b or changing p hides the bug. Compiling
without optimisation also hides the bug.
% gcc-2.95 -O -c foo.c
% gcc-3.2 -O -c foo.c
foo.c: In function `initNetFlowFunct':
foo.c:5: Internal compiler error in simplify_unary_operation, at simplify-rtx.c:636
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
% gcc-3.3 -O -c foo.c
foo.c: In function `initNetFlowFunct':
foo.c:5: internal compiler error: in simplify_unary_operation, at simplify-rtx.c:609
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
% gcc-3.3 -c foo.c
% gcc-2.95 -v
Reading specs from /usr/lib/gcc-lib/m68k-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
% gcc-3.2 -v
Reading specs from /usr/lib/gcc-lib/m68k-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,objc
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-objc-gc m68k-linux
Thread model: posix
gcc version 3.2.3 (Debian)
% gcc-3.3 -v
Reading specs from /usr/lib/gcc-lib/m68k-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-sjlj-exceptions --enable-clocale=gnu --enable-debug
--enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc m68k-linux
Thread model: posix
gcc version 3.3.3 20031206 (prerelease) (Debian)
--
Summary: Assignement of an int to an int of different size in a
struct gives ICE
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brederlo at informatik dot uni-tuebingen dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: linux-m68k
GCC target triplet: linux-m68k
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13889